Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 1998 22:39:25 -0500
From:      Norman C Rice <nrice@emu.sourcee.com>
To:        "Chetan Ravnikar.H" <chetan@vicinity.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Time always runs behind when there is a reboo
Message-ID:  <19980108223925.64463@emu.sourcee.com>
In-Reply-To: <Pine.GSO.3.93.980108101536.28544B-100000@carerra.corp.vicinity.com>; from Chetan Ravnikar.H on Thu, Jan 08, 1998 at 10:57:28AM -0800
References:  <19980107223402.06142@emu.sourcee.com> <Pine.GSO.3.93.980108101536.28544B-100000@carerra.corp.vicinity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980108223925.64463>