[ntp:questions] Peer Review of ntpq -c rv

David Lord snews at lordynet.org
Fri Mar 9 16:43:55 UTC 2012


Alby VA wrote:
> On Mar 8, 6:43 am, David Lord <sn... at lordynet.org> wrote:
>> Alby VA wrote:
>>
>> ....
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>>>>> David
>>>>>  Does this mean there is something I need to tweek to get
>>>>> my offsets lower? Could the delays from the remote NTP
>>>>> servers be my issue?
>>>> I don't know if that's the case. I setup my two servers
>>>> to use the nearest ntp servers that didn't share the same
>>>> sources. There are tools to assist in the ntp distribution
>>>> or you can select from the list of public servers at
>>>> ntp.org. The stratum is usually of no importance. I had
>>>> several stratum3 servers in my initial selection but the
>>>> same servers are now stratum2 or stratum1. By nearest, I
>>>> mean those with shortest delay.
>>>> I'd remove the sources with highest delay, maybe just by
>>>> marking as noselect.
>>>> My own server with gps/pps source gives a couple of blips
>>>> each morning due to load from cron jobs. The other pcs
>>>> show variations from load and from temperature.
>>>> http://www.lordynet.org.uk/mrtg/stats/ntp/
>>>> David
>>>  David:
>>>  Can I get your mrtg.cfg and perl script for those graph/stats?
>>> I think mine are just mislabeled...
>> They can be downloaded from
>>
>> <ftp://ftp0.lordynet.org.uk/pub/os/NetBSD/mrtg_ntp.tbz>
>>
>> David
> 
> 
> David:
> 
>  I downloaded your configs and setup MRTG to run GetNTPus_ntpq.pl,
> but it doesn't seem to be pulling any data. Did I miss something?
> 
> URL: http://godzilla.empire.org/
> 
>

Have you tried running GetNTPus_ntpq.pl from commandline.

# perl /root/scripts/mrtg/GetNTPus_ntpq.pl me6000
2
0
0
0

You should get the offset in usec reported in either of
the first two lines depending if positive or negative.

If that doesn't produce a meaningful output, is output
from "ntpq -c rv -p" ok?


David

> # /etc/mrtg.cfg
> #
> # NTP stats for godzilla
> Target[godzilla_ntp]: `perl /var/log/ntp/GetNTPus_ntpq.pl godzilla`
> MaxBytes[godzilla_ntp]: 12000
> Unscaled[godzilla_ntp]: dwmy
> Timezone[godzilla_ntp]: GMT
> Title[godzilla_ntp]: NTP statistics for godzilla.empire.org - GODZILLA
> Options[godzilla_ntp]: logscale,integer, gauge, nopercent, growright
> YLegend[godzilla_ntp]: offset +/- us
> ShortLegend[godzilla_ntp]: us
> LegendI[godzilla_ntp]: +offset:&nbsp;
> LegendO[godzilla_ntp]: -offset:&nbsp;
> Legend1[godzilla_ntp]: positive offset (us)
> Legend2[godzilla_ntp]: negative offset (us)
> PageTop[godzilla_ntp]: <H1>FreeBSD v9 - Godzilla</H1>
> 
> 
> 
> godzilla#
> godzilla# pwd
> /var/log/ntp
> godzilla# ls -l GetNTPus.pl
> -rwxr-xr-x  1 root  wheel  728 Mar  9 08:27 GetNTPus.pl
> godzilla#
> godzilla#
> 
> 
> 



More information about the questions mailing list