Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RH8 time/clock problem

Status
Not open for further replies.

HebbeLille

Technical User
Nov 25, 2002
35
0
0
SE
Hi,
I've installed Red Hat 8.0, and have been running it for a while (playing with Samba and other stuff). One problem I keep seeing (several times a day) is that the clock keeps living its own life. I put it on "right time", and then after a while, its one (or more) hours ahead of time. Its pretty annoying, since I try to look various logfiles, e.g. ISDN log for incoming calls and stuff.

I have not checked the UTC (or what is says) in the properties-box for "date and time" (well, I've tried both), nor am I using any timeserver.

It seems like it is also setting the time in the BIOS, cause even if I'm changing the time there, it gets altered somehow.

Anyone experiencing similar problem, or know what I can do to fix this annoying little thing?

Thanxx in advance :)

Helge
--xx--
 

It happens when you boot or all the time??

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
It happens all the time... If I set the correct time, and then leave the computer for a while (well, give it a few hours maybe), its certain its changed when I get back to it...
 
If you're not using any timeserver as you say, my next guess would be that your CMOS battery is dead (or very nearly so).
 

But the kernel has it's own clock and a dead CMOS battery wouldn't affect a running computer, only when you reboot.

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Hi again,
I can now state that the clock IS changing even if the machine is running - so that rules out the CMOS battery, right?

I have no ntpd running. At least not of my knowlegde (ps -ef | grep ntp as root).

And the clock is still living its own life... anyone else that can help me fix this problem?

Helge
--xx--
 
Set the time using the date command and then run the: hwclock --systohc command to sync the two clocks. disconnect the LAN cable (just in case it's picking the time up from somewhere outside) and see what happens. Glenn
BEng A+ MCSE CCA
 
Hi,
Tried the commands, and removed both the network and the ISDN cable. However, clock still gets altered somehow....

I found this in my /var/log/messages file:

Feb 10 19:54:06 joppe linesrv[2737]: system-time changed (-26 secs), updating variables
Feb 10 16:55:02 joppe linesrv[2737]: system-time changed (-10792 secs), updating variables
Feb 10 17:00:49 joppe gconfd (helge-923): Failed to send buffer
Feb 10 20:30:28 joppe linesrv[2737]: system-time changed (3603 secs), updating variables


This doesn't look good????? Can't find anything in linesrv.conf that says anything with time-altering... Anyone else experiencing similar, or can help me get out of this???

I use linesrv as a "connect 2 internet" server, and client at my XP box... any other tools handy for the job??? I do like linesrv, but if this tool mess up the time (all the time), then I'm ready to use another one...

Helge
--xx--
 

Make a note of the time and then turn the PC off. Come back 24 hours later and turn it back on. If the time is all out then you need a new BIOS battery. If the time is still correct then it's definately something within your OS that's causing it. Glenn
BEng A+ MCSE CCA
 

Linux still doesn't read the BIOS clock.

Do you have a file called time something in etc??

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
I'll check (when I get home) for the file in /etc... Hopefully I don't have to turn off the machine for 24 hours, would be too long ;-)

So the message in /var/log/message that linesrv is doing something doesn't mean that linesrv is actually altering the system time??? I was starting looking for an alternative dialer...

But thanxx for your tip, I'll check and get back 2 u!
 
Hi again!
Yes, in /etc/services I have the following:

#more /etc/services | grep time

daytime 13/tcp
daytime 13/udp
time 37/tcp timserver
time 37/udp timserver
utime 519/tcp unixtime
utime 519/udp unixtime
timed 525/tcp timeserver
timed 525/udp timeserver

and as files under /etc I have the following:

# ll /etc/ | grep time
-rw-r--r-- 1 root root 49 Feb 11 11:47 adjtime
-rw-r--r-- 1 root root 806 Nov 20 19:15 localtime

And as "services" under /etc/xinetd.d/ I have the following:

#ll /etc/xinetd.d/ | grep time
-rw-r--r-- 1 root root 419 Nov 19 17:53 daytime
-rw-r--r-- 1 root root 438 Nov 19 17:53 daytime-udp
-rw-r--r-- 1 root root 497 Nov 19 17:53 time
-rw-r--r-- 1 root root 518 Nov 19 17:53 time-udp

However, they are all set to "disable = yes"

Whats next? Should I try to comment out the "time's" in /etc/services???? I have tried to shutdown the linesrv server, and still the time gets altered....

Any ideas, anyone?????????
 
Hi again,

I tried to comment out the "time-stuff" in the /etc/services file, and I had a "tail -f" on the /var/log/messages file. Nothing happened in the log, and the clock STILL got altered somehow / by some service.

This is really starting to annoy me! Help will be appreciated...
 
Hi,
To finish this thread - its now working :)

I checked the "guide" referred to above, and it became clear that the problem was me mixing the BIOS clock, the system clock, using UTC or not, and so on...

Keep focused when setting the different clocks, and then it should work just fine :)

Helge
--xx--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top