ρύθμιση ntp για update ώρας μηχανήματος;
Antonis Christofides
anthony at itia.ntua.gr
Sun Oct 14 12:42:27 EEST 2007
> Oct 14 00:00:10 smf-deb ntpd[6653]: kernel time sync status 0040
> Oct 14 00:00:10 smf-deb ntpd[6653]: frequency initialized -500.000 PPM
> from /var/lib/ntp/ntp.drift
> Oct 13 20:32:23 smf-deb ntpd[6653]: synchronized to 155.207.113.227,
> stratum 3
> Oct 13 20:32:23 smf-deb ntpd[6653]: time reset -12480.330449 s
> Oct 13 20:32:23 smf-deb ntpd[6653]: kernel time sync status change 0001
>
> Διορθώνει το ρολόι δηλαδή. Μετά όμως απο λίγη ώρα, και ενώ συνεχίζει να
> τρέχει ο δαίμονας, ενώ είναι 21:32, το ρολόι δείχνει
> smf-deb:/var/log# date
> Sat Oct 13 21:58:50 EEST 2007
Δεν είμαι ειδικός, αλλά κάνω την υπόθεση ότι το drift -500 που είναι
αποθηκευμένο στο /var/lib/ntp/ntp.drift είναι πολύ μεγάλο. Θα πρότεινα
να δοκιμάσεις να stop τον ntp, σβήσε το αρχείο, και ξεκίνα τον ntp.
Παραθέτω και το σχετικό απόσπασμα από το man ntpd.
driftfile driftfile
This command specifies the name of the file use to
record the frequency offset of the local clock
oscillator. If the file exists, it is read at startup
in order to set the initial frequency offset and then
updated once per hour with the current frequency
offset computed by the daemon. If the file does not
exist or this command is not given, the initial
frequency offset is assume zero. In this case, it may
take some hours for the frequency to stabilize and the
residual timing errors to subside.
The file format consists of a single line containing a single
floating point number, which records the frequency offset
measured in parts-per-million (PPM). The file is updated by
first writing the current drift value into a temporary file and
then renaming this file to replace the old version.
This implies that ntpd must have write permission for the
directory the drift file is located in, and that file system
links, symbolic or otherwise, should be avoided.
More information about the Linux-greek-users
mailing list