LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   System Time keeps changing back and forth (http://www.linuxquestions.org/questions/red-hat-31/system-time-keeps-changing-back-and-forth-546490/)

jr8rdt 04-16-2007 10:43 AM

System Time keeps changing back and forth
 
We have a brand new machine Quad Dual Core AMD Opteron Processor 8218. We installed RH AS 3 Update 7 then upgrade it to Update 8. We use rhel-3-u8-i386-as-disc(X).iso to upgrade.

[root@STLMDH4UOF /]# uname -a
Linux STLMDH4UOF 2.4.21-47.ELsmp #1 SMP Wed Jul 5 20:30:47 EDT 2006 i686 athlon i386 GNU/Linux

[root@STLMDH4UOF /]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 3 (Taroon Update 8)
[root@STLMDH4UOF /]#

no ntpd running
the system time keeps changing back and forth

running this script
while (true)
do
echo `date` >> April13th.date.out
done

I get

Mon Apr 16 10:43:56 CDT 2007
Mon Apr 16 10:43:55 CDT 2007
Mon Apr 16 10:43:55 CDT 2007
Mon Apr 16 10:43:57 CDT 2007
Mon Apr 16 10:43:56 CDT 2007
Mon Apr 16 10:43:56 CDT 2007
Mon Apr 16 10:43:55 CDT 2007
Mon Apr 16 10:43:55 CDT 2007
Mon Apr 16 10:43:55 CDT 2007
Mon Apr 16 10:43:57 CDT 2007
Mon Apr 16 10:43:57 CDT 2007
Mon Apr 16 10:43:57 CDT 2007
Mon Apr 16 10:43:56 CDT 2007
Mon Apr 16 10:43:57 CDT 2007
Mon Apr 16 10:43:55 CDT 2007
Mon Apr 16 10:43:57 CDT 2007
Mon Apr 16 10:43:56 CDT 2007
Mon Apr 16 10:43:56 CDT 2007
Mon Apr 16 10:43:56 CDT 2007
Mon Apr 16 10:43:56 CDT 2007
Mon Apr 16 10:43:57 CDT 2007
Mon Apr 16 10:43:56 CDT 2007
Mon Apr 16 10:43:56 CDT 2007
Mon Apr 16 10:43:56 CDT 2007


can you please help?
am I using the correct load for this particular hardware ?

THanks !!!!

MensaWater 04-16-2007 10:57 AM

I'd insert a "sleep 1" into the script. The while loop is spawning multiple date commands and due to the way time slicing is done it is possible that a later date command could complete and display to the screen before an earlier one. That is to say you may have run that got the date (Epoch) before another one did but then displayed the human readable conversion of Epoch AFTER the other one had displayed its conversion. The sleep 1 gives each date command time to complete.

jr8rdt 04-16-2007 11:06 AM

Thanks for the reply. Yes actually I did both sleep 1 and without sleep. the result is essentially the same.

here is with sleep 1

Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:03 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:02 CDT 2007
Mon Apr 16 11:08:04 CDT 2007
Mon Apr 16 11:08:04 CDT 2007

MensaWater 04-16-2007 12:22 PM

You might want to run top and see how heavily loaded your CPU is. I doubt anything could CHANGE the system clock that quickly (even NTP) so it may be the date commands aren't actually finishing even in 1 second though that would be unusual. With a heavily loaded system I could see it occuring though.

I tried it on my FC4 system with the sleep 1 and didn't see the result you get.

jr8rdt 04-16-2007 01:00 PM

this is a brand new machine. new installation. no load at all.
tried with sleep 2, 5, 10. same result.
I am just wondering if I used the right load? am I suppose to use AMD64 load. I don't think I need it.

MensaWater 04-16-2007 01:11 PM

Can't answer that because I've not used an AMD load for anything. All I've done is "Genuine Intel" in the x86 space. (Do have Debian on a PA-RISC box.).

You might want to check a couple of other things first.

First boot the system and go into the BIOS setup (usually hitting F2 or DEL when prompted) to check for settings on the hardware clock. If it gives choice for using UTC (Universal Time Code) go ahead and set it that way.

After booting back into the OS run "hwclock" to see the hardware clock time. Run date to see the "system" time. Set your system time with the date command then run "hwclock -systohc" to set your hardware clock to your system time.

Look through your cron files to insure nothing is running ntpdate (this is a command line to set date rather than requiring you to have ntpd running).

Do "ps -ef |grep ntp" just to be sure you don't see any ntp processes running. (I know you said it isn't configured but it never hurts to check.)


All times are GMT -5. The time now is 09:17 PM.