Operating System - HP-UX
1753802 Members
7861 Online
108805 Solutions
New Discussion юеВ

Time jumps foward then back

 
John McWilliams_1
Frequent Advisor

Time jumps foward then back

Hello all

I have 2 servers where the time between 07:30 and 08:00 randomly jumped to 19:47:00 and then back to the correct time. This occured for about 30 minutes and each time the jump was to 19:47:00. Seems to be stable now but what caused this ?

Thanks John
3 REPLIES 3
spex
Honored Contributor

Re: Time jumps foward then back

Hi John,

Are the servers synched to an NTP server? If so, I would start looking there.

PCS
A. Clay Stephenson
Acclaimed Contributor

Re: Time jumps foward then back

NTP will not do this. I would look for some sort of cron job that is attempting to "fix" the time. Also look for any daemons that are especially long running with very large sleeps. It's possible that a daemon like this would wake up and "correct" the time and go back to sleep. If the TZ environment variable is not being altered then someone is running the date command (or some process is using the stime() system call) AND the effective UID of the process must be zero because only a super-user is allowed to change the date. It is also possible that the time displayed is actually correct but what has happened is that the TZ environment variable has changed. This situation can cause all sorts of discrepancies especially in databases but also in deveopment environments where the timestamps are crucially important to the make utility.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Time jumps foward then back

And to confirm Clay's ideas, this is not an NTP sync problem. There are two (root-only) commands that can change the system time: date and ntpdate. To rule out problems with TZ, use the date -u command. This will show the HP-UX internal time (which is UTC). If that time also jumped, then some crazy cron job in root is 'jumping' the time. Inexperienced sysadmins often write their own clock sync tools, not knowing about NTP or how to properly use it. ntpdate (or date) in cron is definitely wrong. Talok to all other root users about possible 'experiments'.


Bill Hassell, sysadmin