linux-l: hwclock && timeserver
Robin S. Socha
robin at socha.net
Di Jul 13 08:32:28 CEST 1999
* Bernd Freistedt <bf at bcf.in-berlin.de> writes:
> zum Beispiel:
> `netdate -v time.fu-berlin.de > /dev/null ; /sbin/clock -uw`
Ein anderes Beispiel:
/usr/sbin/netdate wuarchive.wustl.edu ntp3.cs.wisc.edu ns3.univie.ac.at \
ntps1-1.uni-osnabrueck.de time.fu-berlin.de ntp.Uni-Augsburg.DE \
ntp.server.uni-frankfurt.de chime1.surfnet.nl ntps1-0.cs.tu-berlin.de \
ws-mue1.win- ip.dfn.de && hwclock --systohc --utc --debug
Warum?
man netdate:
The ''best'' time is chosen by polling the named hosts
once each to find their times and taking their differences
from the local host's time. These differences are used to
find the largest group of hosts whose times agree with
each other within a certain limit. The first host in the
largest group is picked as the best host. (The assumption
is that the hosts which are usually most accurate will be
named first.) That host is polled again and the local
host's time is set to the result. The chosen host's time
is checked on this second poll to insure that its differ-
ence from the local host's time has not varied more than
the limit from its difference at the first poll.
man hwclock
--systohc
Set the Hardware Clock to the current System Time.
--utc Indicates that the Hardware Clock is kept in Coor-
dinated Universal Time. It is your choice whether
to keep your clock in UTC or local time, but noth-
ing in the clock tells which you've chosen. So
this option is how you give that information to
hwclock.
--debug
Display a lot of information about what hwclock is
doing internally. Some of its function is complex
and this output can help you understand how the
program works.
--
Robin S. Socha <http://socha.net/>
Mehr Informationen über die Mailingliste linux-l