On Wed, 22 Mar 2000, Tomasz Motylewski wrote:
> On Wed, 22 Mar 2000, Nicolas Jourdan wrote:
>
> > Is there someone who knows a tools to get the time from Internet to
> > update the
> > system clock ?
>
> ntpdate bernina.ethz.ch (find a server which is closer to you)
>
> ntpdate is distributed with xntpd package.
Some people have mentioned xntpd, others ntpdate. Both of these use NTP
(Network Time Protocol) to maintain system time (very accurately, I may
add).
xntpd is a system daemon that periodically checks ntp servers for the
date. ntpdate is designed to be run before xntpd starts. It's job is to
set the system clock once, then exit. The idea is that xntpd doesn't deal
well if the local and server clocks are REALLY skewed (it will take a LONG
time for xntpd to bring the system clock to the correct time, as I
recall). ntpdate brings the local clock close to the correct time
regardless of skew, then xntpd is run to bring the local clock to in line
with the correct time in millisecond accuracy, and to keep it that way.
On your embedded system, you may not want to run xntpd, so running ntpdate
by cron would work if millisecond accuracy is not essential. (BTW, on my
home system where I use VNC all the time, xntpd caused vncviewer to hang
periodically, for no apparant reason. So I shut it off and run ntpdate
every night. Good enough for me.)
Both xntpd and ntpdate require an NTP server, preferably not too many
router hops away. In my old Slackware 3.x installation I had a utility
caled "netdate" that worked similar to ntpdate, except it just connected
to the the time port (UDP port 37) of another host. However, my RH6.0
installation doesn't have netdate. And you need to enable time in
/etc/inetd.conf and restart inetd on the host you want to get the time
from.
See also hwclock if your system time seems to stray from your RTC but your
RTC is reliable. At least one system I have, the RTC is usually pretty
good but the system time really gets off-kilter.
Jeremy Impson
Associate Network Engineer
Advanced Technologies Department
Lockheed Martin Federal Systems
email: [EMAIL PROTECTED]
phone: 607-751-5618
fax: 607-751-6025
--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.