How to be sure that my system time is drifted?

Aashish Chugh asked:

in my some of production environment time is drifted, i install ntp on my system.

when i am executing ntpstat command, i can see below output.

synchronised to NTP server ( at stratum 4
time correct to within 20 ms
polling server every 512 s

but i am unable to understand this output.

Like if my linux time is 1 second drifted then i execute ntpstat command what the command will do.

is the command sync the time from ntp server and automatically adjust my local time.

how i be make sure that my linux time was incorrect and ntp correct this.

Please help!

My answer:

When ntpd makes an adjustment to the system clock, it will log a message in the system log. One of these two messages will appear:

time slew ? s
The time error exceeds the step threshold and is being slewed to the correct time. You may have to wait a very long time.
time reset ? s
The time error exceeds the step threshold and has been reset to the correct time. Computer scientists don’t like this, but they can set the ntpd -x option and wait forever.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.