[ntp:questions] Logging and tracking drift of hardware clock

KEVIN ZEMBOWER KZEMBOWE at jhuccp.org
Mon Feb 2 14:15:51 UTC 2004


Good morning, all. I'm a fairly casual user of ntp, just using it to set the time on my servers, not running an ntp server myself. Once a month, I run this cron job on each of my five servers:
real:/etc # crontab -l|grep ntp
0 0 1 * * /usr/sbin/ntpdate tock.usno.navy.mil && /sbin/hwclock --systohc --debug -u
real:/etc # 

I'll usually get back the response pasted in below my signature. I'd like to track the adjustment made each month, to see if it changes. How would you all recommend doing this? I searched this mailing list's archives for 'logging' but didn't see anything pertaining to this situation. 'hwclock' doesn't seem to have any logging output options.

Thanks for all your suggestions.

-Kevin Zembower

 1 Feb 00:05:26 ntpdate[11766]: step time server 192.5.41.41 offset 324.946612 sec
hwclock 2.4c/util-linux-2.10f
Using /dev/rtc interface to clock.
Last drift adjustment done at 1072933526 seconds after 1969
Last calibration done at 1072933526 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 05:07:02
Hw clock time : 104/02/01 05:07:02 = 1075612022 seconds since 1969
Time elapsed since reference time has been 0.891875 seconds.
Delaying further to reach the next full second.
Setting Hardware Clock to 05:05:27 = 1075611927 seconds since 1969
ioctl(RTC_SET_TIME) was successful.
Clock drifted -96 seconds in the past 2678496 seconds in spite of a drift factor of -12.761200 seconds/day.
Adjusting drift factor by -3.096663 seconds/day


-----
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD  21202
410-659-6139




More information about the questions mailing list