I have a cron mession runs every minute So I can get a log in /var/log/message every minute But sometimes the timestamps of the log messages goes abnormal For example, a 12:20:20 message comes before a 12:10:00 message ,and after this message is a 12:11:00 message But for the same task goes as normal time It seems someone turns the clock in a process and turn it back again This will last for a while and then become normal I search many times but get nothing useful Anyone could give me a hint?

link|improve this question
1  
Does the log receive receive log messages from the network? If yes, your nodes might be out of sync. – Peter G. Mar 14 '11 at 15:35
Not form network, it is a local log – Anonymous Mar 14 '11 at 15:48
feedback

migrated from stackoverflow.com Mar 14 '11 at 19:40

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

1 Answer

does the process take longer than a minute to run? If so, you could be seeing the message written at the end of processing using the start time of the process which could make some messages appear out of sync.

link|improve this answer
Yes, the process may take longer than a minute, but not all the times And I thought that it is just a log, maybe a syslog(...) call, and the time was generated by the syslog-ng , is it? And I write a short test just like this: Time()->localtime()->write() And I run it for a day, and Find this scene again My system runs a network server and some fs test program(a distributed network fs test suit) May the heavily io workload or network load lead to this?And why? – user71822 Mar 15 '11 at 13:43
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.