Zeitquelle und Status

Zeigt, woher das System seine Zeit bezieht und ob die Synchronisation läuft.

PowerShell (Windows)

w32tm Bordmittel

w32tm /query /status
w32tm /query /source

Get-Date Bordmittel

Get-Date -Format o
Get-TimeZone

Unix-Shell (bash)

timedatectl Bordmittel

timedatectl status

chronyc / ntpq Zusatztool

chronyc tracking
ntpq -p

Ein Domänenmitglied holt seine Zeit vom Domänencontroller; nur der PDC-Emulator zieht eine externe Quelle.

Zeitserver prüfen

Fragt einen Zeitserver ab und zeigt den Versatz je Messung.

PowerShell (Windows)

w32tm Bordmittel

w32tm /stripchart /computer:ch.pool.ntp.org /samples:5 /dataonly

w32tm peers Bordmittel

w32tm /query /peers

Unix-Shell (bash)

timedatectl Bordmittel

timedatectl show-timesync --all

chronyc / ntpdate Zusatztool

chronyc sources -v
ntpdate -q ch.pool.ntp.org

Uhrenversatz zu einem Host

Vergleicht die eigene Uhr mit der eines anderen Systems: mehr als fünf Minuten Versatz brechen Kerberos.

PowerShell (Windows)

Invoke-Command / w32tm Bordmittel

w32tm /stripchart /computer:mail.example.com /samples:3 /dataonly
# Grosser Versatz bricht Kerberos (Standard: max. 5 Minuten).

net time Zusatztool

net time \\mail.example.com

Unix-Shell (bash)

date / curl Bordmittel

date -u
curl -sI https://mail.example.com | grep -i "^date:"
# Beide Zeiten vergleichen: grosser Versatz bricht Kerberos und TLS-Pruefungen.

ntpdate Zusatztool

ntpdate -q mail.example.com

Auch bei Mail zählt die Uhr: ein grosser Versatz lässt Zertifikate «noch nicht gültig» erscheinen und verschiebt Zeitstempel in den Kopfzeilen.

Zeit neu synchronisieren

Setzt die Zeitquelle und erzwingt eine sofortige Synchronisation.

PowerShell (Windows)

w32tm Bordmittel

w32tm /config /manualpeerlist:"ch.pool.ntp.org" /syncfromflags:manual /update
Restart-Service w32time
w32tm /resync /force

Get-Service Bordmittel

Get-Service w32time | Format-List Status, StartType

Unix-Shell (bash)

timedatectl Bordmittel

sudo timedatectl set-ntp true
timedatectl timesync-status

chronyc Zusatztool

sudo chronyc makestep
chronyc sources

Verändert die Systemkonfiguration; auf einem Domänencontroller nur mit Bedacht und Kenntnis der Zeithierarchie ausführen.

Weitere Bereiche