Time / NTP
Check the time source and clock skew: the basis for Kerberos and TLS.
Time source and status
Shows where the system gets its time from and whether synchronisation is working.
PowerShell (Windows)
w32tm Built-in
w32tm /query /status
w32tm /query /source Get-Date Built-in
Get-Date -Format o
Get-TimeZone Unix shell (bash)
timedatectl Built-in
timedatectl status chronyc / ntpq Add-on tool
chronyc tracking
ntpq -p A domain member takes its time from the domain controller; only the PDC emulator uses an external source.
Check a time server
Queries a time server and shows the offset per sample.
- Time server
-
ch.pool.ntp.orgChange in the builder →
PowerShell (Windows)
w32tm Built-in
w32tm /stripchart /computer:ch.pool.ntp.org /samples:5 /dataonly w32tm peers Built-in
w32tm /query /peers Unix shell (bash)
timedatectl Built-in
timedatectl show-timesync --all chronyc / ntpdate Add-on tool
chronyc sources -v
ntpdate -q ch.pool.ntp.org Clock skew against a host
Compares your clock with another system's: more than five minutes of skew breaks Kerberos.
- Host / server
-
mail.example.comChange in the builder →
PowerShell (Windows)
Invoke-Command / w32tm Built-in
w32tm /stripchart /computer:mail.example.com /samples:3 /dataonly
# Grosser Versatz bricht Kerberos (Standard: max. 5 Minuten). net time Add-on tool
net time \\mail.example.com Unix shell (bash)
date / curl Built-in
date -u
curl -sI https://mail.example.com | grep -i "^date:"
# Beide Zeiten vergleichen: grosser Versatz bricht Kerberos und TLS-Pruefungen. ntpdate Add-on tool
ntpdate -q mail.example.com The clock matters for mail too: a large skew makes certificates look "not yet valid" and shifts the timestamps in the headers.
Resynchronise time
Sets the time source and forces an immediate synchronisation.
- Time server
-
ch.pool.ntp.orgChange in the builder →
PowerShell (Windows)
w32tm Built-in
w32tm /config /manualpeerlist:"ch.pool.ntp.org" /syncfromflags:manual /update
Restart-Service w32time
w32tm /resync /force Get-Service Built-in
Get-Service w32time | Format-List Status, StartType Unix shell (bash)
timedatectl Built-in
sudo timedatectl set-ntp true
timedatectl timesync-status chronyc Add-on tool
sudo chronyc makestep
chronyc sources Changes the system configuration; on a domain controller, only run it deliberately and with the time hierarchy in mind.