Possible bug in clock

Please post any bugs you have found
Post Reply
Message
Author
RMW
Posts: 85
Joined: Mon 12 Sep 2005, 15:58

Possible bug in clock

#1 Post by RMW »

Puppy 1.0.6, using IceWM. The clock (displayed in the task bar) is losing time, badly. I find myself having to run the Internet Time utility every 10 minutes or so to keep it up to date.

Not sure what the problem is here, I've checked all the settings and the hardware clock, and they are correct.

As a temporary fix, perhaps a script that will run every couple minutes to silently update the time from the internet could be written?

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

There is a Dotpup in the Wiki/ in the Dotpupdownloader in System Utilities for this.

Mark

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#3 Post by GuestToo »

that's peculiar

there is the hardware clock ... sort of a clock chip like in your clock radio

and there is the Linux system clock

the system clock works with the cpu's interrupts
there might be something wrong with the cpu's clock pulses (as in "overclocking"), or the interrupt timer ... maybe a clock pulse divider is not working

when Puppy boots, it sets the Linux system time from the hardware clock ... you could try something like this ... this will set the system time from the hardware clock once every 5 minutes

Code: Select all

#!/bin/sh
while true
do
  hwclock --hctosys --localtime
  sleep 300
done
if this seems to help, then the hardware clock would be working more-or-less ok, but there would be something wrong with the system clock (possibly software, but it might be something like a defective clock pulse divider chip)

this script will set the system clock from the internet once every 5 minutes ... it does not set the hardware clock

Code: Select all

#!/bin/sh
while true
do
  rdate -s time.nist.gov
  sleep 300
done
you can use another time server ... they may not like you using the time server so heavily ... if you have other computers on a local network, you can install a time server on one of the machines and synchronize all your machine to the local time server

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#4 Post by GuestToo »

i've never used it, but maybe adjtimex would solve your problem ... man page

RMW
Posts: 85
Joined: Mon 12 Sep 2005, 15:58

#5 Post by RMW »

MU wrote:There is a Dotpup in the Wiki/ in the Dotpupdownloader in System Utilities for this.

Mark
I know, I use it, but I have to use it constantly to keep the clock correct.

It's not the hardware clock. WinXP is keeping time properly, and I'm not overclocking.

Thanks for the script. I assume I can call that from rc.local so it auto runs at boot?

Appreciate the help!

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#6 Post by GuestToo »

running a script from rc.local should be ok

in clock docs it suggests periodically setting the system clock from the hardware clock

Windows system clock is simpler than Linux's, and it might not use the same hardware

Chrony might solve your problem

# chronyd -d -r
System clock wrong by -6.153442 seconds, adjustment started

Post Reply