Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here is the scenario:

I have a two node machine. The master node synchronizes its time with some external source and then sets a reference time source for the slave node to sync its time.

I wanted to know how to check that the time is synchronized on the master node and reference time source is set and now ntpdate command can be run on slave node.

I read about NTP and found out that if ntpq -p shows an asterisk in the output like below:

remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================  
10.20.94.1      10.20.78.3    6 u   13   64  327    0.407  893.508  770.685 
*127.127.1.0     .LOCL.       0 l   16   16  377    0.000    0.000  0.001

which means the master node is ready. But it is working sometimes and sometimes not.

I want to know where i am going wrong or there is some specific pattern to look for in the ntpq o/p.

share|improve this question

migrated from stackoverflow.com Dec 17 '11 at 3:04

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

Run ntpq -c rv. In the first line of the output, you should see clock_sync if the clock is synchronized. A full description of the first line of the output can be found here: http://www.eecis.udel.edu/~mills/ntp/html/decode.html#sys

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.