LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ntp (https://www.linuxquestions.org/questions/linux-newbie-8/ntp-4175487092/)

sachin.davra 12-06-2013 07:34 AM

ntp
 
how to know if my computer is being syncing with ntp server or not.

acid_kewpie 12-06-2013 07:48 AM

run "ntpq -pn" and look for an entry marked with *'s:
Code:

    remote          refid      st t when poll reach  delay  offset  jitter
==============================================================================
*10.101.168.249  172.16.83.1      4 u  83 1024  377    1.515  -1.777  0.284


sachin.davra 12-09-2013 12:56 AM

Quote:

Originally Posted by acid_kewpie (Post 5076468)
run "ntpq -pn" and look for an entry marked with *'s:
Code:

    remote          refid      st t when poll reach  delay  offset  jitter
==============================================================================
*10.101.168.249  172.16.83.1      4 u  83 1024  377    1.515  -1.777  0.284


I can't * on any of the entry where i have configured NTP.

acid_kewpie 12-09-2013 02:12 AM

you're not synced then. show us the output.

sachin.davra 12-09-2013 02:16 AM

Quote:

Originally Posted by acid_kewpie (Post 5077739)
you're not synced then. show us the output.

Below output is of one pc

Quote:

[root@GAIDL-5001 ~]# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
120.88.47.10 .INIT. 16 u - 1024 0 0.000 0.000 0.000
[root@GAIDL-5001 ~]
Below output is of second pc

Quote:

[sachin.davra@GAIDL-5015 ~]$ ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
120.88.46.10 103.1.106.69 2 u 83m 1024 20 22.645 408.725 0.518
[sachin.davra@GAIDL-5015 ~]$

acid_kewpie 12-09-2013 02:36 AM

OK, so for the first, the "16" number means that the remote server isn't responding / is unreachable on the network.

For the second, less immediately obvious. Stop the NTP service and run "ntpdate -d 120.88.46.10" to see the debug about the decision to use that server.

sachin.davra 12-09-2013 02:55 AM

It was blocked in firewall. thnx for your time.


All times are GMT -5. The time now is 12:14 AM.