[ntp:questions] get current drift value

unruh unruh at wormhole.physics.ubc.ca
Wed Mar 2 00:39:48 UTC 2011


On 2011-03-01, April <xiaoxia2005a at yahoo.com> wrote:
> On Mar 1, 3:28?pm, Terje Mathisen <"terje.mathisen at tmsw.no"> wrote:
>> April wrote:
>> > is there a way to get the current drift value, using ntp utilities
>> > such as ntpq and ntpdc, instead of opening the ntp.drift file?
>>
>> ntpq -c rv
>>
>> This command returns a lot of info:
>>
>> C:\>ntpq -c rv
>> associd=0 status=0618 leap_none, sync_ntp, 1 event, no_sys_peer,
>> version="ntpd 4.2.7p... at 1.2478-o Feb 23 13:55:41 (UTC+01:00) 2011 ?(1)",
>> processor="x86", system="Windows", leap=00, stratum=2, precision=-19,
>> rootdelay=0.952, rootdisp=24.321, refid=241.10.116.86,
>> reftime=d117d2f5.dc257ff4 ?Tue, Mar ?1 2011 21:17:57.859,
>> clock=d117d4ee.e17a6898 ?Tue, Mar ?1 2011 21:26:22.880, peer=58961, tc=6,
>> mintc=3, offset=-6.749, frequency=5.941, sys_jitter=59.553,
>> clk_jitter=8.906, clk_wander=0.153, ctr_frequency=-5.13
>>
>> Near the end you'll notice 'frequency=5.941' which is the current drift
>> value!
>>
>> Terje
>>
>> --
>> - <Terje.Mathisen at tmsw.no>
>> "almost all programming can be viewed as an exercise in caching"
>
> Thanks Terje!  I have an ntp v3 server and the output value looks like
> ppb (instead of ppm). 
Why not tell us what it says, rather than your interpretation. AFAIK it
has always been ppm.


 Also tried ntpdc -c loopinfo which can auto
> adjust and get back the values of ppm for both v3 and v4. :-)  April




More information about the questions mailing list