Subject: Not keeping correct time

From: Shaya Potter <[email-masked]>
Date: Mon, 19 Aug 1996 17:42:08 -0400 (EDT)

I just noticed that my linux box dosen't seem to be keeping correct 
time.  I tried running xntp to correct it, but it wouldn't work (does it 
work behind firewalls?) Does anyone know of an efficient way to make my 
linux box keep correct time?

Thanks

Shaya
--
Shaya Potter
[email-masked]

---

From: [email-masked]
Date: Mon, 19 Aug 96 22:13 EDT

Shaya Potter writes:
  Shaya>  I just noticed that my linux box dosen't seem to be keeping correct
  Shaya> time. 

File that under "advantages of being IBM PC compatible"  :-)

  Shaya> Does anyone know of an efficient way to make my linux box keep
  Shaya> correct time?

I have these two lines in a script that cron runs nightly for root 

        netdate tcp <hostname_of_a_timeserver>
        clock -u -w    

Netdate is in netstd, you already have it.  I am sure that you can find a
timeserver in your domain, if not, pointers to do them are in the xntp doc.
Afterwards, clock -u -w writes (-w) the correctly set time into the bios
using GMT (-u) time.

--
Dirk Eddelb"uttel                             http://qed.econ.queensu.ca/~edd

---

From: Dale Scheetz <[email-masked]>
Date: Tue, 20 Aug 1996 09:24:11 -0400 (EDT)

> linux box keep correct time?
This is the script I use to keep my clock "on time":

/usr/sbin/netdate tick.usno.navy.mil tock.usno.navy.mil
/sbin/clock -w

Luck,

Dwarf

------------                                          --------------

aka   Dale Scheetz                   Phone:   1 (904) 877-0257
      Flexible Software              Fax:     NONE 
      Black Creek Critters           e-mail:  [email-masked]

------------ If you don't see what you want, just ask --------------

---

From: Shaya Potter <[email-masked]>
Date: Tue, 20 Aug 1996 09:31:42 -0400 (EDT)

Whenever I try to do a netdate to any site, I get a connection refused 
error, I done both tcp and udp.  Could it be because I am behind a firewall?

Thanks

Shaya
--
Shaya Potter
[email-masked]

---

From: Dale Scheetz <[email-masked]>
Date: Tue, 20 Aug 1996 11:36:13 -0400 (EDT)

> error, I done both tcp and udp.  Could it be because I am behind a firewall?
Very possibly.
The reason your system clock gains/looses time (one or the other, not
both) is that the timer that the system uses runs of the system crystal
and is not dividable to an even second. Your calendar clock does not
suffer from this problem and is far more accurate. Thus 'clock -s' will
reset the system clock to the "more accurate" calendar clock. These clocks
tend to stay within 1 sec/year of the correct time. If this kind of
accuracy is not sufficient then you will need to learn about breaking out
of firewalls. I am totaly ignorant on this subject, so please tell us what
you learn.

Luck,

Dwarf

------------ If you don't see what you want, just ask --------------

---

From: Michael Meskes <[email-masked]>
Date: Tue, 20 Aug 1996 09:34:38 +0200 (MET DST)

> linux box keep correct time?

If you don't want to go over the internet you could try adjtimex. This
package adjusts the kernel timex variable and makes your system keep the
time pretty well.

If it works well you should think about a BIOS write command (clock -w),
too.

Michael

-- 
Michael Meskes                   |    _____ ________ __  ____
[email-masked] |   / ___// ____/ // / / __ \___  __________
[email-masked]                  |   \__ \/ /_  / // /_/ /_/ / _ \/ ___/ ___/
[email-masked]                |  ___/ / __/ /__  __/\__, /  __/ /  (__  )
Use Debian Linux!                | /____/_/      /_/  /____/\___/_/  /____/

---

From: "Christopher R. Hertel" <[email-masked]>
Date: Tue, 20 Aug 1996 15:11:47 -0500

: On Mon, 19 Aug 1996, Shaya Potter wrote:
> Subject: Re: Not keeping correct time
:
: I just noticed that my linux box dosen't seem to be keeping correct
: time.  I tried running xntp to correct it, but it wouldn't work (does
: it  work behind firewalls?) Does anyone know of an efficient way to
: make my linux box keep correct time?

I don't know if xntp works behind firewalls, but as a test you can try
running ntpdate, which should be part of the same package.

Run

# ntpdate -d <list of hosts>

as root (without xntpd running).  You should get back about a page of
information for each remote host and, at the bottom, it should tell you
which host it liked and how far off your clock is.  Note that the
remote hosts must be running the xntpd server for this to work.

Chris -)-----

-- 
Christopher R. Hertel -)-----                   University of Minnesota
[email-masked]              Networking and Telecommunications Services

---

From: [email-masked] (Bernd Eckenfels)
Date: Tue, 20 Aug 1996 15:52:22 +0200 (MET DST)

Hi,

>         netdate tcp <hostname_of_a_timeserver>
clock is inteligent enough to correct systematic errors. The options for
this are controled in /etc/adjtime. The clock is adjusted everytime you
boot. If you want this more frequently, put an "clock -au" into cron.daily.
Of course netdate is the better solution, as long as you have net-access.

Greetings
Bernd