Path: ccw.ch!usenet From: Neil.Franklin.remove.this@ccw.ch Newsgroups: alt.hackers Subject: Server clock correction Date: 10 Mar 1998 23:52:51 +0100 Organization: My own Private Self Lines: 43 Approved: do you need Approval? Message-ID: X-Newsreader: Gnus v5.3/Emacs 19.34 This consists only of an ObHack (yes that exists), but its not by me. A colleague has an server with an very imprecise clock chip (over 1 hour per month deviation). Even the Kernal software clock is better. First he tried writing the software clock to the hardware on every shutdown. That was better, but nowhere near good. One day he noticed an precise computer clock - on his notebook PC - and that was running Linux. So the idea was born to set the server from the notebook (perverse but great). But: the notebook by its nature is normally offline and typing a "set clock" command every so often when connected is an invitation to trouble (by forgetting). So: the server has a cron job that every 30 minutes goes and does a NTP clent call to the IP address of the notebook. To avoid problems when that is on the road (mostly) this is done with a short timeout of 1 second. The notebook has an permanent NTP server running (this is Linux!). At latest 30 minutes after connecting the notebook to the net the servers next NTP probe is successfull - snarf the time and set both software and hardware clocks. Works like a dream. Both me and an other hacker (also alt.hackers reader) thought this one was so good we had to discuss who was going to post it :-) Sorry Peter for the 5 day delay in posting, my newsfeed was dead :-( -- private: Neil.Franklin.remove.this@ccw.ch, http://www.ccw.ch/Neil.Franklin/ office: franklin.remove.this@arch.ethz.ch, http://caad.arch.ethz.ch/~franklin/ I don't like it Microsoft, I like it Megahard If I go missing, its once again my newsfeed that has craped