Mailinglist Archive: opensuse (3337 mails)

< Previous Next >
Re: [SLE] date problem
  • From: Darryl Gregorash <raven@xxxxxxxxxxxxx>
  • Date: Wed, 12 Apr 2006 16:09:56 -0600
  • Message-id: <443D7AB4.3070609@xxxxxxxxxxxxx>
On 12/04/06 14:34, Doug McGarrett wrote:
>I tried to send a message from my Linux machine,
>but it may have been rejected because of the
>date problem. The machine seems to want to
>live in the future. A couple of months ago,
>it thought it was 2010. Now it thinks it's 2012.
>Someone told me then how to reset the date, but
>I've forgotten, and the man page did not set
>me straight. Someone help me please, and this time
>I'll paste the instructions on my keyboard!
With a system time that screwed up, you really need to be running an NTP
client. Install packages xntp and xntp-doc, the base URL for the
documentation is file:///usr/share/doc/packages/xntp-doc/html/index.html.

The client can be fully configured from within YaST, under Network
Services/NTP client; go to
and find 3 or 4 stratum 2 NTP servers, and enter these in the YaST
configuration screen. Please note that most want you to send an email
when you connect to their servers, but few will deny you access if you
do not. You will probably want to have the client started at bootup, and
to run it in a chroot jail. Also open the port in the firewall, in case
you have protected reserved (below 1024) ports from unauthorized
outbound traffic (by default, NTP uses only one port for both source and
destination). If the firewall allows any outbound traffic (which I
believe it does by default), then you don't need this.

You can edit the parameters for each chosen time server. One (at least)
should be selected for initially synchronizing the client; this is done
during the boot process, before the ntp daemon is started. With the
apparent (lack of) quality of your system time, I would suggest you
specify "maxpoll 9" for each server. This will give 512 seconds between
polls. If system time cannot be properly synchronized with this setting,
change it to 8 (256 seconds).

I would also suggest that, before you start the ntp daemon, you should
set your system time to something close to the truth (you can use your
watch, it is certainly more accurate than the computer :D ); write
system time to the hardware clock with "hwclock --systohc", run as root.
If your hardware clock is kept on UTC, specify the --utc parameter also.

Use the ntpdc program to monitor your system time. The "help" command
gives a list of available commands. The ones which change the
configuration require a password (configurable manually), but you
probably won't need to use any of these. All commands which simply give
information do not require a password. They are all fully explained in
the documentation, but I'll just mention a few that you will want to use
frequently while getting your system time under control:

peers -- prints information about each time server, including which one
is currently selected for synchronization, plus offsets between server
time and system time.

kerninfo and
sysinfo -- these two give important information regarding your system
clock. They give in particular the frequency adjustment to the clock
frequency, plus the amount of correction currently being applied (see
the documentation on this, the time is not adjusted in steps, except
when it is way off base. Otherwise, it is adjusted by minor changes to
the clock frequency, in addition to the frequency adjustment already

Don't worry about "pps" stuff in the kerninfo information; that is for
"pulse-per-second" sources, which you don't have (maybe you should
consider investing in one though; Garmin makes a very nice GPS receiver
unit that plugs into an RS232 port, for about US$100 or less -- then you
could be a stratum 1 time server :) ). However, you do want to keep an
eye on the "stability" returned by sysinfo. This should be only a few
ppm, and if it is not, then your systemboard is so out to lunch it
should probably be replaced. Also keep an eye on "estimated error"
returned by kerninfo; this should not exceed a few milliseconds.

You will probably also want to tweak your /etc/ntp.conf file to provide
additional logging information; the log works, but I have never been
able to get the statistics files to be written. Probably that
information isn't strictly necessary; every hour, an entry similar to
the following is written to the log file (default /var/log/ntp):

12 Apr 15:27:37 ntpd[6705]: offset -0.001025 sec freq 81.717 ppm error
0.006545 poll 9

As well, a log entry is written each time the daemon changes the server
it is synchronizing to. This can happen quite often, if you are not
shaping your network traffic, depending on network load.

< Previous Next >