Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!rutgers!att!icus!lenny From: lenny@icus.islp.ny.us (Lenny Tropiano) Newsgroups: comp.sys.att Subject: Re: 3b1 real time clock runs fast Message-ID: <600@icus.islp.ny.us> Date: 10 Feb 89 05:04:15 GMT References: <671@gvgspd.GVG.TEK.COM> Reply-To: lenny@icus.islp.ny.us (Lenny Tropiano) Distribution: na Organization: ICUS Software Systems, Islip, New York Lines: 56 In article <671@gvgspd.GVG.TEK.COM> mrk@gvgspd.GVG.TEK.COM (Michael R. Kesti) writes: |>I have found that my 3b1's real time clock gains about a minute per week, and |>was wondering if any of you hardware types out there might be able to steer |>me toward a trim cap or something to correct this annoying, if not monumental, |>problem. |> |>Thanks. |> I'm not sure why the UNIX pc software clock seems to mindlessly speed up. It happens here pretty regularly. I've seen it elsewhere, but I've also seen it where it runs perfectly. In the stock /usr/lib/crontab there is an entry: 3 3 * * 0 /bin/su root % /etc/clockupd.wk > /dev/null #sccs "@(#)fndetc:clockupd.wk 1.7" # Write to the hardware clock every Sunday morning to accomodate # synchronization of time between s/w and h/w clock in case day light # saving time is being used. Wait a minute to prevent recursion. # Note: backslash needed to avoid SCCS conflict sleep 60 date `date +%m%d%H\%M` ... Which is run Sunday at 3:03am ... it basically get's the time, and then sets it back... I have a feeling that this set's the clock ahead more often than not. The reason for sleeping, as they explain is to prevent the time from going back one minute and running this script over and over from the cron facility. This is the problem with the program that someone posted (fixrtc.c) a while back... It could actually put the time back in the past and will run the program over and over and over ... The "date(1)" command has an option "-" that is explain in the manual as: date - sets the system time from the real time clock This is done on bootup in the /etc/rc file. I run periodically here manually a "date ; date - ; date" to see what the difference in the hardware and software clocks are ... and to reset the software clock. I don't have an automatic feature for this right now, maybe someone can suggest something more reliable. Maybe I can write something with my Voice Power board to call up the Recorded Time message, do some speech recognition, and set the time ... I guess not, it's too hardware dependent :-) -Lenny -- Lenny Tropiano ICUS Software Systems [w] +1 (516) 582-5525 lenny@icus.islp.ny.us Telex; 154232428 ICUS [h] +1 (516) 968-8576 {talcott,decuac,boulder,hombre,pacbell,sbcs}!icus!lenny attmail!icus!lenny ICUS Software Systems -- PO Box 1; Islip Terrace, NY 11752