From owner-freebsd-questions Thu Jan 8 19:39:46 1998 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA05181 for questions-outgoing; Thu, 8 Jan 1998 19:39:46 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from emu.sourcee.com (emu.sourcee.com [199.201.159.173]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id TAA05168 for ; Thu, 8 Jan 1998 19:39:37 -0800 (PST) (envelope-from nrice@emu.sourcee.com) Received: (from nrice@localhost) by emu.sourcee.com (8.8.8/8.8.3) id WAA28638; Thu, 8 Jan 1998 22:39:26 -0500 (EST) Message-ID: <19980108223925.64463@emu.sourcee.com> Date: Thu, 8 Jan 1998 22:39:25 -0500 From: Norman C Rice To: "Chetan Ravnikar.H" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Time always runs behind when there is a reboo References: <19980107223402.06142@emu.sourcee.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88 In-Reply-To: ; from Chetan Ravnikar.H on Thu, Jan 08, 1998 at 10:57:28AM -0800 Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Thu, Jan 08, 1998 at 10:57:28AM -0800, Chetan Ravnikar.H wrote: > > > Well, I am not sure whether you're running FreeBSD and whether you're > excuse me for that Norman, I have the commercial version of BSD/OS 3.0 > just taken over a job and donno yet if we are covered by a support as > things are just pilling up on ME No problem. It appears you're not running FreeBSD, but I should be able to help. > > > connected to the Internet when you boot, but on the chance that you > yes it's a bastion host connected to the internet and runs the proxy > toolkit from TIS > > > are... Enable ntpdate and its command line arguments in /etc/rc.conf. > surprisingly I don't see the /etc/rc.conf file although /etc/rc checks > for it's existance to set the clock using ntpdate and there is an > additional check for /etc/ntp.conf if yes--> to run *xntpd* The reason you don't have an /etc/rc.conf file is that you're not running FreeBSD. The good news is that if you create a file named /etc/ntp.conf, xntpd (NTP time daemon) will start up and the next time you boot and automatically synchronize your PC's time with stratum 1 or 2 time servers. > else the value of $timedflags is imported from /etc/netstart and that's > set to NO, which says we are not running the *timed* daemon. > Shoud I be running that!? I think ntpdate or xntpd will resolve your problem without the need for running timed. > > I did read the xntpd man pages and found out that, if the /etc/rc.conf > doesn't exist I should be setting the kernel *tick* variable from /etc/rc > using the *tickadj* command but havn't tried that before I think you should stick to xntpd to resolve your present problem. > > Is there any way I can get the format of this file (/etc/rc.conf) or just The format of /etc/rc.conf isn't needed for your BSD system; it's for FreeBSD versions 2.2.5 and newer. > create one with the options below Do you have a `ntpdate' command on your BSD box? If you can locate it, you can run it once at startup to synchronize your PC's time. Just add the following command to your startup files (after the routes are up to the Internet). ntpdate -s XXX.XXX.XXX.XXX See below for where to find time server IP addresses. You can also run this command in a cron job to keep your system's clock accurate. > > > ntpdate_enable="YES" # Run the ntpdate to sync time (or NO). > > ntpdate_flags="-s XXX.XXX.XXX.XXX" # Flags to ntpdate (if enabled). > > > > where XXX.XXX.XXX.XXX is the IP address of a stratum time server. > and where do I get it's IP addr There are two links for stratum time servers at http://www.eecis.udel.edu/~mills/ntp/servers.html I believe you should select secondary (stratum 2) servers. It really shouldn't matter how close they are to your site, but it doesn't hurt. Select several time servers (they have been known to go down now and then). After you have selected several time server addresses, as root, create a /etc/ntp.conf file similar to the following, but use the IP addresses that you selected. server 129.6.16.35 server 18.72.0.3 server 18.145.0.30 server 130.105.4.59 The file on this system has the following permissions. emu:~$ ls -l /etc/ntp.conf -rw-r--r-- 1 root wheel 75 Dec 17 21:24 /etc/ntp.conf If all goes well (check system/syslog files), your time will be correct after you restart your BSD system. Note that a file named /etc/ntp.drift should get created after your system runs xntpd for a while. See the manual page for details. > > > Does BIOS report the correct time after a reboot? > Yup BIOS does give the correct time but the OS lags > > > Do you have your time zone set properly? > yup it's a PST > > thanking you muchly for all your views > > -CHR -- Regards, Norman C. Rice, Jr.