clock not keeping time

JJB Barbish3 at
Sat Feb 7 07:30:37 PST 2004

I have found that when the pc fails to keep correct internal time,
this is an symptom of the motherboard battery going bad. Power off
PC, open case, find, and replace battery. It's looks like an thick
dime. After replacing, set time manually with date command and it
should be fine.

-----Original Message-----
From: owner-freebsd-questions at
[mailto:owner-freebsd-questions at]On Behalf Of Matthew
Sent: Saturday, February 07, 2004 4:13 AM
To: Earl
Cc: freebsd-questions at
Subject: Re: clock not keeping time

On Fri, Feb 06, 2004 at 10:26:51PM -0600, Earl wrote:
> I change the clock to the correct time. And the next day when I
log in
> the time is worng. How can I fix this. So that it will keep the
> time.

In general, use ntpd(8) to synch your sytem clock to various time
servers on the net.  This works well on a broadband or always-on
connection, but be warned that it will bring up a dial-up line about
every twenty minutes, so it's probably not what you want in that
situation -- an alternative in that case is to use ntpdate(8) out of
your /etc/ppp/ppp.linkup script.

Here's a sample /etc/ntp.conf that you can probably just drop into
your system.  See for details of the
'' system.  Replace the nework number and netmask in the
3rd line with the ones appropriate to your site:

    restrict default nomodify nopeer         # Restrict access ...
    restrict                       # ... except for me ...
    restrict mask  # ... an the local net


    pidfile /var/run/
    driftfile /var/ntp/ntp.drift

See also the lists of public stratum 2 servers at for some more
servers if you need them.  Plus consult your ISP -- most will make
servers available for their customers.

To turn on NTP using the ntp.conf above in your system add:

    ntpdate_flags="-b -s"

to your /etc/rc.conf (The 'xntpd' bit is historic -- ntpd(8) was
called xntpd(8) for some time).



Dr Matthew J Seaman MA, D.Phil.                       26 The
                                                      Savill Way
PGP:         Marlow
Tel: +44 1628 476614                                  Bucks., SL7

More information about the freebsd-questions mailing list