Windows
Command
w32tm /stripchart /computer:hostname.domain.tld /dataonly /samples:5
Examples
w32tm /stripchart /computer:ptbtime1.ptb.de /dataonly /samples:5
ptbtime1.ptb.de wird verfolgt [192.53.103.108:123]. 5 Proben werden gesammelt. Es ist 07.08.2023 16:57:20. 16:57:20, +00.0193985s 16:57:22, +00.0194122s 16:57:24, +00.0191248s 16:57:26, +00.0193623s 16:57:28, +00.0192728s
w32tm /stripchart /computer:example.com /dataonly /samples:5
example.com wird verfolgt [93.184.216.34:123].
5 Proben werden gesammelt.
Es ist 07.08.2023 16:58:57.
16:58:57, Fehler: 0x800705B4
16:59:00, Fehler: 0x800705B4
16:59:03, Fehler: 0x800705B4
16:59:06, Fehler: 0x800705B4
16:59:09, Fehler: 0x800705B4
Linux
Command
ntpdate -o4 -q hostname.domain.tld
Examples
ntpdate -o4 -q ptbtime1.ptb.de
server 192.53.103.108, stratum 1, offset +1.350449, delay 0.05023
7 Aug 15:27:18 ntpdate[1257]: step time server 192.53.103.108 offset +1.350449 sec
ntpdate -o4 -q example.com
7 Aug 15:28:28 ntpdate[1260]: no server suitable for synchronization found
Links
https://linux.die.net/man/8/ntpdate
https://superuser.com/questions/451018/how-can-i-query-an-ntp-server-under-windows#451066