Is the Optiplex hwclock junk?

"Andrew A. Raines" <[email protected]> Wed, 03 Dec 2003 09:27:14 -0600
Newsgroups gmane.comp.lib.libtai
Message-ID <[email protected]>
I'm running a supervise'd clockspeed moderated by Frank
Tegtmeyer's measurements algorithm at
<URL:http://fte.tegtmeyer.net/djbware/clockspeed_setup.html> on
a Dell Optiplex GX260 running Linux 2.4.21.

I've been using this machine for about three months now, with
its current uptime being its longest at about 50 days (that's
also how long the clockspeed daemon was running until I ran svc
-tu yesterday).  That's long enough that the clockadjust
measurements are multiple weeks between readings which is also
apparently enough time to let the internal hardware clock show
its true colors: it loses 2 minutes every five hours.  When left
betwixt someclock runs for over a week, it had lost 16 minutes.

This is the first machine for which I've ever witnessed
clockspeed not faithfully do its duty.  However, I thought this
is precisely the type of problem it loves--a heavily drifting
clock.  Why is my clock so skewed?

Have I done something wrong?  I've set up clockspeed on a dozen
machines over the past three years and it's never failed to
eliminate drift.  If it's not operator error, is it possible the
hardware is just too crappy to be trusted and I'll need to run
sntpclock every couple hours?  A coworker has a Dell Precision
``workstation'' which he said will lose 5 minutes a day if
doesn't ntpdate it every hour.  I've run other Dell hardware
that hasn't had this problem though.

Confused,

     Drew

More info, if it helps:

   $ head -50 /service/clockspeed/run /service/clockadjust/run 
   ==> /service/clockspeed/run <==
   #!/bin/sh

   . /etc/clockspeed.conf

   PATH=/bin:/usr/bin:/usr/local/bin
   exec 2>&1

   echo "setting clock..."
   #envdir ./env sntpclock $TIMESERVER | clockadd
   $CLOCK_DIR/bin/someclock | $CLOCK_DIR/bin/clockadd

   echo "starting clockspeed..."
   exec $CLOCK_DIR/bin/clockspeed

   ==> /service/clockadjust/run <==
   #!/bin/sh
   #
   exec setuidgid clock ./clockadjust

   $ sudo svstat /service/clock*
   Password:
   /service/clockadjust: up (pid 1572) 79745 seconds
   /service/clockspeed: up (pid 1560) 80753 seconds

   $ tai64nlocal </service/clockadjust/log/main/current | tail -43
   2003-12-02 11:11:23.294955500 Sleeping 600 seconds ...
   2003-12-02 11:21:23.620303500 before: 2003-12-02 11:21:23.620174000000000000
   2003-12-02 11:21:23.620337500 after:  2003-12-02 11:22:18.169011425811767578
   2003-12-02 11:21:23.621433500 before: 2003-12-02 11:21:23.621213000000000000
   2003-12-02 11:21:23.621436500 after:  2003-12-02 11:21:23.621213000418202858
   2003-12-02 11:21:23.621643500 ----------------------
   2003-12-02 11:21:23.623112500 Sleeping 1200 seconds ...
   2003-12-02 11:41:24.239987500 before: 2003-12-02 11:41:24.239830000000000000
   2003-12-02 11:41:24.240021500 after:  2003-12-02 11:42:18.181078643493652343
   2003-12-02 11:41:24.241116500 before: 2003-12-02 11:41:24.240893000000000000
   2003-12-02 11:41:24.241119500 after:  2003-12-02 11:41:24.240893000418202858
   2003-12-02 11:41:24.241333500 ----------------------
   2003-12-02 11:41:24.242721500 Sleeping 2400 seconds ...
   2003-12-02 12:21:25.460205500 before: 2003-12-02 12:21:25.460040000000000000
   2003-12-02 12:21:25.460264500 after:  2003-12-02 12:22:18.187964472351074218
   2003-12-02 12:21:25.461528500 before: 2003-12-02 12:21:25.461297000000000000
   2003-12-02 12:21:25.461531500 after:  2003-12-02 12:21:25.461297000418202182
   2003-12-02 12:21:25.461754500 ----------------------
   2003-12-02 12:21:25.467388500 Sleeping 4800 seconds ...
   2003-12-02 13:41:27.889841500 before: 2003-12-02 13:41:27.889680000000000000
   2003-12-02 13:41:27.889871500 after:  2003-12-02 13:42:18.193187773803710937
   2003-12-02 13:41:27.891238500 before: 2003-12-02 13:41:27.891002000000000000
   2003-12-02 13:41:27.891241500 after:  2003-12-02 13:41:27.891002000418202396
   2003-12-02 13:41:27.891496500 ----------------------
   2003-12-02 13:41:27.897955500 Sleeping 9600 seconds ...
   2003-12-02 16:21:32.739135500 before: 2003-12-02 16:21:32.738525000000000000
   2003-12-02 16:21:32.739203500 after:  2003-12-02 16:22:18.635372763641357421
   2003-12-02 16:21:32.740548500 before: 2003-12-02 16:21:32.740312000000000000
   2003-12-02 16:21:32.740552500 after:  2003-12-02 16:21:32.740312000418202568
   2003-12-02 16:21:32.740781500 ----------------------
   2003-12-02 16:21:32.747766500 Sleeping 19200 seconds ...
   2003-12-02 21:41:42.419118500 before: 2003-12-02 21:41:42.418798000000000000
   2003-12-02 21:41:42.433838500 after:  2003-12-02 21:43:37.831100620697021484
   2003-12-02 21:41:42.454424500 before: 2003-12-02 21:41:42.454089000000000000
   2003-12-02 21:41:42.454426500 after:  2003-12-02 21:41:42.454089000418202688
   2003-12-02 21:41:42.454675500 ----------------------
   2003-12-02 21:41:42.473442500 Sleeping 38400 seconds ...
   2003-12-03 08:22:01.741170500 before: 2003-12-03 08:22:01.741018000000000000
   2003-12-03 08:22:01.772756500 after:  2003-12-03 08:23:37.767401673950195312
   2003-12-03 08:22:01.772874500 before: 2003-12-03 08:22:01.772682000000000000
   2003-12-03 08:22:01.772891500 after:  2003-12-03 08:22:01.772682000418202732
   2003-12-03 08:22:01.773345500 ----------------------
   2003-12-03 08:22:01.786059500 Sleeping 76800 seconds ...