AIX TIME CHANGE


 
Thread Tools Search this Thread
Operating Systems AIX AIX TIME CHANGE
# 1  
Old 01-17-2011
Question AIX TIME CHANGE

Hi Guys ,

I see a weird problem with one of the AIX Machine, The time is changing randomly on the server. The seconds part of the time is what is the problem which is jumping on a uneven order and coming back to the original state after some time and again the same.. I have collected the time output for every second and see the change in value

Time_on_Sys == The time of the date output
Actual_Time == Is the value that is expected

Day Month Date Time_on_Sys Actual_Time Time_Zone Year
Mon Jan 17 13:40:24 13:40:24 CET 2011
Mon Jan 17 13:40:25 13:40:25 CET 2011
Mon Jan 17 13:40:26 13:40:26 CET 2011
Mon Jan 17 13:40:27 13:40:27 CET 2011
Mon Jan 17 13:40:32 13:40:28 CET 2011
Mon Jan 17 13:40:33 13:40:29 CET 2011
Mon Jan 17 13:40:34 13:40:30 CET 2011
Mon Jan 17 13:40:35 13:40:31 CET 2011
Mon Jan 17 13:40:36 13:40:32 CET 2011
Mon Jan 17 13:40:37 13:40:33 CET 2011
Mon Jan 17 13:40:38 13:40:34 CET 2011
Mon Jan 17 13:40:39 13:40:35 CET 2011
Mon Jan 17 13:40:40 13:40:36 CET 2011
Mon Jan 17 13:40:37 13:40:37 CET 2011
Mon Jan 17 13:40:38 13:40:38 CET 2011
Mon Jan 17 13:40:43 13:40:39 CET 2011
Mon Jan 17 13:40:44 13:40:40 CET 2011
Mon Jan 17 13:40:45 13:40:41 CET 2011
Mon Jan 17 13:40:46 13:40:42 CET 2011
Mon Jan 17 13:40:47 13:40:43 CET 2011
Mon Jan 17 13:40:48 13:40:44 CET 2011
Mon Jan 17 13:40:49 13:40:45 CET 2011
Mon Jan 17 13:40:46 13:40:46 CET 2011
Mon Jan 17 13:40:47 13:40:47 CET 2011
Mon Jan 17 13:40:52 13:40:48 CET 2011
Mon Jan 17 13:40:53 13:40:49 CET 2011
Mon Jan 17 13:40:54 13:40:50 CET 2011
Mon Jan 17 13:40:55 13:40:51 CET 2011
Mon Jan 17 13:40:56 13:40:52 CET 2011
Mon Jan 17 13:40:57 13:40:53 CET 2011
Mon Jan 17 13:40:58 13:40:54 CET 2011
Mon Jan 17 13:40:59 13:40:55 CET 2011
Mon Jan 17 13:41:00 13:40:56 CET 2011
Mon Jan 17 13:41:01 13:40:57 CET 2011
Mon Jan 17 13:40:58 13:40:58 CET 2011
Mon Jan 17 13:40:59 13:40:59 CET 2011
Mon Jan 17 13:41:00 13:41:00 CET 2011
Mon Jan 17 13:41:01 13:41:01 CET 2011
Mon Jan 17 13:41:02 13:41:02 CET 2011
Mon Jan 17 13:41:03 13:41:03 CET 2011
Mon Jan 17 13:41:04 13:41:04 CET 2011
Mon Jan 17 13:41:05 13:41:05 CET 2011
Mon Jan 17 13:41:06 13:41:06 CET 2011
Mon Jan 17 13:41:07 13:41:07 CET 2011
Mon Jan 17 13:41:08 13:41:08 CET 2011
Mon Jan 17 13:41:09 13:41:09 CET 2011
Mon Jan 17 13:41:14 13:41:10 CET 2011
Mon Jan 17 13:41:11 13:41:11 CET 2011
Mon Jan 17 13:41:12 13:41:12 CET 2011
Mon Jan 17 13:41:13 13:41:13 CET 2011
Mon Jan 17 13:41:14 13:41:14 CET 2011
Mon Jan 17 13:41:15 13:41:15 CET 2011
Mon Jan 17 13:41:16 13:41:16 CET 2011
Mon Jan 17 13:41:21 13:41:17 CET 2011
Mon Jan 17 13:41:18 13:41:18 CET 2011
The ntpd deamon is down and there is no synchronization enabled for time. The server is running IBM DB2. Not sure what is causing the problem here. Can someone throw some light on it please ?
# 2  
Old 01-17-2011
How are you generating this report?
# 3  
Old 01-17-2011
specifically how did you generate the expected time and system time (what command or system call did you use)

If time is truly messed up, you could not have gotten an expected time except from an outside source.
# 4  
Old 01-17-2011
The actual time is the normal time out of the system. I generated the the report combining the actual time with the system generated output using the below script which will collect the sys time for every 1 second

Code:
x=0
while [ $x -lt 30000 ]
do
date >> time_seconds.out
sleep 1
done

===============================
Output:-
Mon Jan 17 13:40:20 CET 2011
Mon Jan 17 13:40:21 CET 2011
Mon Jan 17 13:40:22 CET 2011
Mon Jan 17 13:40:23 CET 2011
Mon Jan 17 13:40:24 CET 2011
Mon Jan 17 13:40:25 CET 2011
Mon Jan 17 13:40:26 CET 2011
Mon Jan 17 13:40:27 CET 2011
Mon Jan 17 13:40:32 CET 2011
Mon Jan 17 13:40:33 CET 2011
Mon Jan 17 13:40:34 CET 2011
Mon Jan 17 13:40:35 CET 2011
Mon Jan 17 13:40:36 CET 2011
Mon Jan 17 13:40:37 CET 2011
Mon Jan 17 13:40:38 CET 2011
Mon Jan 17 13:40:39 CET 2011
Mon Jan 17 13:40:40 CET 2011
Mon Jan 17 13:40:37 CET 2011
Mon Jan 17 13:40:38 CET 2011
Mon Jan 17 13:40:43 CET 2011
Mon Jan 17 13:40:44 CET 2011
Mon Jan 17 13:40:45 CET 2011
Mon Jan 17 13:40:46 CET 2011
Mon Jan 17 13:40:47 CET 2011
Mon Jan 17 13:40:48 CET 2011
Mon Jan 17 13:40:49 CET 2011
Mon Jan 17 13:40:46 CET 2011
Mon Jan 17 13:40:47 CET 2011
Mon Jan 17 13:40:52 CET 2011
Mon Jan 17 13:40:53 CET 2011
Mon Jan 17 13:40:54 CET 2011
Mon Jan 17 13:40:55 CET 2011
Mon Jan 17 13:40:56 CET 2011
Mon Jan 17 13:40:57 CET 2011
Mon Jan 17 13:40:58 CET 2011
Mon Jan 17 13:40:59 CET 2011
Mon Jan 17 13:41:00 CET 2011
Mon Jan 17 13:41:01 CET 2011
Mon Jan 17 13:40:58 CET 2011
Mon Jan 17 13:40:59 CET 2011
Mon Jan 17 13:41:00 CET 2011

# 5  
Old 01-17-2011
sleep 1 will sleep for around one second. Given the vagaries of multiuser systems, clock timings, and cosmic rays (you can never tell) -- sleep might run for 0.9 seconds or 1.05 seconds. Add to that time the amount of time that date takes to run, and I can easily see seconds being skipped:
  • 09:12:03.75 - date runs, prints 09:12:03
  • 09:12:04.05 - sleep runs
  • 09:12:05:06 - date runs, prints 09:12:05
I would expect even a simple C-program such as:
Code:
#include <stdio.h>
#include <time.h>

void main(int argc, char **argv) {
    while (1) {
        sleep(1);
        printf("%ld\n", time((void *) 0));
    }
}

to skip a second now and again, although a lot less frequently.

If you need accuracy, look at time(7).
# 6  
Old 01-17-2011
Thx for that...

Even if i do manually using the date command I see the problem

See the below output You can see that time went to 12:43:00 and again came back to 12:42:57

Code:
body { margin: 0pt; padding: 0pt; }td, div { font-family: Tahoma; font-size: 8pt; vertical-align: top; }body { margin: 0pt; padding: 0pt; overflow: hidden; }.transcript { background-color: rgb(210, 210, 210); }.messageBlock { margin-left: 4px; margin-bottom: 3px; }.message { margin-left: 100px; word-wrap: break-word; white-space: pre-wrap; }.messageCont { margin-left: 100px; word-wrap: break-word; white-space: pre-wrap; }.other { overflow: hidden; color: rgb(57, 87, 122); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.myself { overflow: hidden; color: rgb(218, 129, 3); font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont { font-size: 8px; text-align: right; color: rgb(57, 87, 122); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.myselfCont { font-size: 8px; text-align: right; color: rgb(218, 129, 3); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.system { margin-left: 4px; word-wrap: break-word; color: rgb(218, 129, 3); font-style: normal; font-weight: normal; white-space: pre-wrap; }.showTimestamp { padding-left: 8px; margin-right: 3px; float: right; color: rgb(153, 153, 153); font-style: normal; font-weight: normal; }.other1 { color: rgb(172, 32, 0); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont1 { font-size: 8px; text-align: right; color: rgb(172, 32, 0); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other2 { color: rgb(60, 159, 168); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont2 { font-size: 8px; text-align: right; color: rgb(60, 159, 168); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other3 { color: rgb(226, 86, 20); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont3 { font-size: 8px; text-align: right; color: rgb(226, 86, 20); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other4 { color: rgb(11, 106, 200); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont4 { font-size: 8px; text-align: right; color: rgb(11, 106, 200); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other5 { color: rgb(178, 50, 144); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont5 { font-size: 8px; text-align: right; color: rgb(178, 50, 144); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other6 { color: rgb(2, 231, 199); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont6 { font-size: 8px; text-align: right; color: rgb(2, 231, 199); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other7 { color: rgb(91, 50, 132); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont7 { font-size: 8px; text-align: right; color: rgb(91, 50, 132); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.highlight { background-color: rgb(190, 214, 248); }.datestamp { cursor: default; margin-bottom: 1px; background-color: rgb(192, 192, 192); width: 100%; float: left; text-align: right; color: rgb(255, 255, 255); font-weight: bold; font-style: italic; }#chatAlert { border-bottom: 1px solid rgb(232, 208, 145); padding: 6px; float: left; width: 100%; color: rgb(165, 117, 76); }#chatAlertImage { float: left; }#chatAlertText { float: left; margin-left: 6px; }#chatAlertClose { float: right; margin-right: 10px; padding-right: 6px; margin-top: 0px; }#chatAlertText a { color: rgb(165, 117, 76); }#chatAlertText a:hover { color: rgb(165, 117, 76); text-decoration: none; }.tsDisplay { display: block; }.dsDisplay { display: none; }    b2bsprt@disrs31;/home/db2bsprt> date
Mon Jan 17 12:42:57 CET 2011
db2bsprt@disrs31;/home/db2bsprt> date
Mon Jan 17 12:42:58 CET 2011
db2bsprt@disrs31;/home/db2bsprt> date
Mon Jan 17 12:42:59 CET 2011
db2bsprt@disrs31;/home/db2bsprt> date
Mon Jan 17 12:43:00 CET 2011
db2bsprt@disrs31;/home/db2bsprt> date
Mon Jan 17 12:42:57 CET 2011
db2bsprt@disrs31;/home/db2bsprt> date
Mon Jan 17 12:42:58 CET 2011
db2bsprt@disrs31;/home/db2bsprt> date
Mon Jan 17 12:43:12 CET 2011
db2bsprt@disrs31;/home/db2bsprt> date

# 7  
Old 01-17-2011
Quote:
Originally Posted by kkeng808
Hi Guys ,

I see a weird problem with one of the AIX Machine, The time is changing randomly on the server. The seconds part of the time is what is the problem which is jumping on a uneven order and coming back to the original state after some time and again the same..[...]The ntpd deamon is down and there is no synchronization enabled for time. The server is running IBM DB2. [...]
If system time really jumps to and fro in such big steps your DB is in dire straits and might crash. If I was in your shoes I would open a PMR with IBM immediately...

In the meantime check and try this:
  • Is this a standalone server or an LPAR? Type?
  • What firmware level does this server have?
  • If this was an LPAR, does time jump in other LPARs of the same frame, too?
  • Does this weird behaviour go on when xntpd is active?

Last edited by shockneck; 01-17-2011 at 07:07 PM.. Reason: spelling...
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Bug in AIX 6.1/7.1 Time Zone DST Change -again

Hi Everyone Just wanted to share with you that IBM AIX is having again problem with Summer Time Shift.. IBM Possible Action Required: System time may not change properly at DST start/end dates on AIX 7.1 and AIX 6.1 - United States For me it means some additional overtimes in the... (0 Replies)
Discussion started by: gito
0 Replies

2. Debian

change time

Hi all, I want change the time settings from EST to IST by using command line in Debian os. but it is not taken. Can any body show me the how to change the time settings by using command line. Thanks, (1 Reply)
Discussion started by: mastansaheb
1 Replies

3. Shell Programming and Scripting

how to change time hr:mm to mm:hr in perl

Hi I want to match time hr:mm and change to mm:hr please let me know how to do that in perl (2 Replies)
Discussion started by: lakshmikant
2 Replies

4. AIX

How to change time on servers

Hi all We are currently using AIX 5.3, we reuquire to change the time according to the daylight saving scenario. We are using the internal clock and are not synced with ntp server. Can any one please tell me how to do that without effecting the processes running on the servers? (2 Replies)
Discussion started by: masquerer
2 Replies

5. Solaris

change time

The time of our Solaris server now is slowly more 20 seconds. How can we change it ? (3 Replies)
Discussion started by: anhtt
3 Replies

6. UNIX for Dummies Questions & Answers

Change the time in AIX

I have already updated the DST change but my system time is about 10 minutes off. How do i set the time in the AIX 5.3? Thanks Dave (1 Reply)
Discussion started by: rocker40
1 Replies

7. Linux

How To change time?

what command must i use to change time ? (4 Replies)
Discussion started by: Sirius
4 Replies

8. UNIX for Dummies Questions & Answers

How to change time as root?

Hi, Can someone tell me how to change time inside red hat linux machine as root? ThanX! (1 Reply)
Discussion started by: whatisthis
1 Replies

9. UNIX for Dummies Questions & Answers

Time change not working...

Hi, I am pretty new to the Solaris world. Just installed the version 8 and found that the time is off. I am in the Central time zone. In the beginning, the date and time was off by a day. After changing the /etc/default/init, there is no avail. The date is now correct but the time is still 5 hours... (7 Replies)
Discussion started by: conflansun
7 Replies
Login or Register to Ask a Question