People have asked how I get the NTP statistics plotted by MRTG. Well I got the idea from Piotr Trojanek who had the following code for Unix: #!/bin/sh ntpq -c rv \ |tail -n 1 \ |sed 's/[a-z=,]//g' \ |mawk '{printf "%d\n%d\n", int(($1 > 0) ? $1 : -$1), int(($2 > 0) ? $2 : -$2)}' ntpdc -c sysstats \ |mawk '{TOTSEC = $3; H = int(TOTSEC/3600); TOTSEC -= H*3600; M = int(TOTSEC/60); TOTSEC -= M*60; printf "%02d:%02d:%02d\n", H, M, TOTSEC; exit 0}' echo "ntp_host" as the command to be run from MRTG, but as I am running Windows, I substituted a Perl script for the Unix script. The first step is to get MRTG to take its data from a command line rather than an SNMP query. You do this by placing the command to run in back-quotes as the argument to an MRTG "Target" statement. Then you need to write the command or script to write the four values MRTG is expecting to standard output. --------------------------------------------------------------- Extract from mrtg.cfg --------------------------------------------------------------- Target[odin_ntp]: `perl GetNTP.pl odin` MaxBytes[odin_ntp]: 200 MaxBytes2[odin_ntp]: 200 Unscaled[odin_ntp]: dwmy Timezone[odin_ntp]: GMT Title[odin_ntp]: NTP statistics for Odin - offset from NTP Options[odin_ntp]: integer, gauge, nopercent, growright YLegend[odin_ntp]: offset+100 ms ShortLegend[odin_ntp]: ms LegendI[odin_ntp]: LegendO[odin_ntp]: offset: Legend1[odin_ntp]: n/a Legend2[odin_ntp]: time offset in ms, with 100ms offset added to ensure it's positive! PageTop[odin_ntp]: