Impostazione e gestione Windows Time service
Nell’articolo Sincronizzazione oraria in un dominio Active Directory avevo trattato la gestione del Windows Time service nell’ipotesi di sistemi Windows Server 2003 e XP anche se i concetti sono applicabili anche a sistemi Windows Server 2008\Vista e successivi.
In questo post cercherò di schematizzare l’uso di w32tm per gestire il Windows Time service nel caso dell’impostazione di un NTP server esterno.
Query server NTP utilizzato:
w32tm /query /source
Visualizzazione ora distribuita da un server NTP:
w32tm /stripchart /computer:IPNTPServer /samples:5 /dataonly
oppure
w32tm /stripchart /computer:DNSNameNTPServer /samples:5 /dataonly
Impostazione server NTP: w32tm /config /manualpeerlist:IPNTPServer /syncfromflags:MANUAL
oppure
w32tm /config /manualpeerlist:DNSNameNTPServer,0x1 /syncfromflags:MANUAL
Aggiornamento della configurazione:
w32tm /config /update
Riavvio Windows Time service:
net stop w32time && net start w32time
Sincronizzazione manuale:
w32tm /resync /nowait
Per controllo verificare le seguenti chiavi di registry:
HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type=NTP
HKLM\SYSTEM\CurrentControlSet\Services\W32Time\AnnounceFlags = 5
(5=1+4 0x01 = Always time server, 0x04 = Always reliable time server, per default è 10=2+8 0x02 = Automatic time server, 0x08 = Automatic reliable time server. Insostanza si usa 10 per sincronizzarsi con l’orologio interno CMOS e 5 per sincronizzarsi con una fonte esterna)
HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer\Enabled = 1
HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\NtpServer = ServerNTP
Per informazioni si vedano:
- Windows Time and the W32TM service
- Synchronize the Time Server for the Domain Controller with an External Source
- Windows Time Service Tools and Settings
- How to configure an authoritative time server in Windows Server
- Configuring the Windows Time Service
- How the Windows Time Service Works
- Config\AnnounceFlags Entry
- Parameters\NtpServer
- Parameters\Type Subkey
[…] Per informazioni su come gestire il servizio di sincronizzazione temporale di Windows si veda il mio post Impostazione e gestione Windows Time service. […]