Re: My System Clock - Under Slink
*- On 10 Feb, Steven Evatt wrote about "My System Clock - Under Slink"
> Howdy folks,
>
> I'm running slink (kernel version 2.0.33) on a 486 and I'm having an
> interesting problem with my uptime. I'm courious if this is a "feature"
> or a "bug".
>
> The log below is from a cronscript that every four hours logs that my
> system still has a heart beat. This is accomplished by appending uptime
> to the end of a file. I know this is not the best way of tracking uptime,
> but what the hell. It was only one line of code.
>
> Anyhow, note that at midnight on day 75, my system had been on for 14
> hours and 17 minutes. Then two days later, at midnight on day 77 they
> system is up for 14 hours and 18 minutes. This trend continues on down
> the log. My system seems to be credit me about 24 hours and 30 seconds
> for every 24 hours of operation. Any clue as to what is causing this?
>
> Thanks
>
> steven
>
> ps. I didn't realy know what information you needed, so I'll be happy
> to provide any system information required to investigate this.
>
[uptime log snipped]
Well I know that hardware clocks are known to drift. Are you updating
your system clock to the hardware clock on a regular basis? You could
use hwclock and netdate to adjust the drift in the clock from a known
good source.
I run the following everytime I connect to my ISP, your ISP has to
support the protocol used by netdate. You could also use the xntp3
package to get time from a server.
#!/bin/sh
/usr/sbin/netdate tcp isp.host
/sbin/hwclock --adjust
/sbin/hwclock --systohc
Nice uptime by the way!
--
Brian
---------------------------------------------------------------------
"Never criticize anybody until you have walked a mile in their shoes,
because by that time you will be a mile away and have their shoes."
- unknown
Mechanical Engineering bservis@usa.net
Purdue University http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------
Reply to: