das@earvax.UUCP (Dave Steffens) (08/11/86)
Index: /etc/rc Ultrix FIX Description: Recently I have been doing device driver development under Ultrix 1.1 on my uVAX. This requires frequent rebooting in order to debug the driver code. I have noticed that the system I am working on loses a **significant** amount of time with respect to another uVAX to which it is networked. Time is never lost over the weekend when I'm not working. To make a long story short, the time loss seems to be caused by some fooling around in /etc/rc to establish the time zone. Some stuff has been added to date(1) but the code in /etc/rc does not make good use of it -- the seconds read from the TOY clock at boot time are thrown away by the code in /etc/rc. Repeat-by: Reboot your Ultrix 1.1 (1.2?) system 10 times. Watch it lose an average of 30 seconds each time. After 10 trys, it will be about 5 minutes slow. Fix: Make the following changes. I have shortened "PERCENT" to "PCT" so that the format string for date fits on an 80 char line. Before you ask -- No, I don't know why they didn't just use "%". 2c2 < PERCENT=% --- > PCT=% 7c7 < dt=`date -u "+${PERCENT}y${PERCENT}m${PERCENT}d${PERCENT}H${PERCENT}M"` --- > dt=`date -u "+${PCT}y${PCT}m${PCT}d${PCT}H${PCT}M.${PCT}S"` -- {harvard,mit-eddie,think}!eplunix!earvax!das David Allan Steffens 243 Charles St., Boston, MA 02114 Eaton-Peabody Laboratory (617) 523-7900 x2748 Mass. Eye & Ear Infirmary
bhoward@funvax.UUCP (Bruce Howard) (08/14/86)
I noticed the same problem with our Ultrix systems. I found a reasonable solution by invoking the /etc/rdate program in our /etc/rc.local file. Place: if [ -f /etc/rdate ]; then /etc/rdate -sv >/dev/console into /etc/rc.local. When run with these options, rdate sends a broadcast message across the ethernetwork, requesting each host to send back the local time. It then waits about 2 seconds, taking the average of any replies, and sets the local time to the average plus 2 seconds. You actually do not need the -v option -- that merely has rdate print each of the times it received from the other hosts. I may have muffed up the details, but this is essentially what it does. Look in the Ultrix documentation for further trivia. Cheers! Bruce -- --------------------------------- ...decvax!ittatc!funvax!bhoward Bruce Howard @ Fairfield University ...ihnp4!itivax!funvax!bhoward Located in Scenic Fairfield, CT 06430 ---------------------------------