[ntp:questions] ntpq -p command query

unruh unruh at invalid.ca
Tue Jul 30 19:30:53 UTC 2013


On 2013-07-30, Biswajit Panigrahi <BP00106533 at TechMahindra.com> wrote:
> Hi,
>
> I have configured the ntp server and ntp client on two machine.
>
> Both are communicating properly. I would like to test when the
> connectivity between those two goes down, after how much time the
> "reach" option in ntpq -p command becomes zero.
>
> For that I stopped the ntp server  and I executed the ntpq -p in
> client's  console,
>
> The reach option will still  keep on increase to 377 then gradually
> decreases to zero. The time duration to come to zero is almost 20
> minute.
>
> Can we reduce the time gap ?

Why? Why do you care how rapidly the reach option goes to 0? 
ntpd only queries the server occasionally (default is 2^6 (about 1min on
startup and 2^10 (about 20 min) sec after things have stabilized.) Each
time one of those attempts fails, one bit is lost from the reach, so it
will go to zero after about 3 hrs. That is the way that ntpd works. 
Now you can if you wish have the client query more often. If you own the
server that is fine. If you do not own the server, that is considered
very bad manners, and the server may refuse to serve you anymore.


A shorter poll interval means that the offset is smaller but the rate
correction is more inaccurate, meaning that if your system goes down the
clock will become inaccurate more rapidly. Since on a local net, keeping
the times within a few 10s of microseconds is very doable, it is not
clear what youwant. 

>
>  
>
> Please find the ntp.conf in client:
>
>  
>
> server 10.16.48.19 key 1
>
> restrict 10.16.48.19 mask 255.255.255.255 nomodify notrap noquery
>
> restrict 127.0.0.1
>
> broadcastclient novolley
>
> broadcastdelay 0
>
> keys /var/ntp/keys
>
> trustedkey 1
>
> logfile /var/log/ntp/ntpd.log
>
> driftfile /var/log/ntp/ntp.drift
>
> statsdir /var/log/ntp/
>
> statistics loopstats peerstats
>
> filegen loopstats file loopstats type day enable
>
> filegen peerstats file peerstats type day enable
>
>  
>
> Any suggestion will really appreciated.

Stop worrying.


>
>  
>
> Regards,
>
> Biswajit
>
>
>============================================================================================================================
> Disclaimer:  This message and the information contained herein is proprietary and confidential and subject to the
>  Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> 
> externally and <a href="http://tim.techmahindra.com/tim/disclaimer.html">http://tim.techmahindra.com/tim/disclaimer.html</a> internally within Tech Mahindra.
>============================================================================================================================



More information about the questions mailing list