apro questa discussione forse lunga e noiosa solo per capire qualcosa in più di ntpd.
Questi giorni sto configurando un paio di macchine in cui gira Slackware13.1 e mi serve che abbiano l'orologio preciso e sincronizzato.
Niente di difficile:
- rendo eseguibile rc.ntpd
- edito /etc/ntp.conf e decommento questa riga:
server pool.ntp.org
- riavvio
Ovviamente impostando sul bios l'ora UTC e mettendo come localtime (in fase di installazione) Rome .
Ho sempre fatto così e l'ora dei "miei" pc è sempre stata precisa.
Voglio però capire un po' meglio come funziona ntpd quindi ho fatto alcune prove.
Dopo aver riavviato la macchina (che già aveva l'ora precisa e sincronizzata) ho spostato l'ora 2 minuti indietro. Dato che erano le 20:00 ho eseguito da root:
Codice: Seleziona tutto
date -s 19:58Codice: Seleziona tutto
sh /etc/rc.d/rc.ntpd stop
sh /etc/rc.d/rc.ntpd start
Codice: Seleziona tutto
/usr/sbin/ntpd -g -p /var/run/ntpd.pidCodice: Seleziona tutto
-g, --panicgate
Allow the first adjustment to be Big. This option may appear an unlimited number of times.
Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold,
which is 1000 s by default. This option allows the time to be set to any value without restric-
tion; however, this can happen only once. If the threshold is exceeded after that, ntpd will
exit with a message to the system log. This option can be used with the -q and -x options. See
the tinker configuration file directive for other options.So che eseguendo ntpdate avrei avuto l'ora giuta immediatamente ma vorrei capire come ragiona ntpd...


