[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ntpsec as server questions



On 12/4/23 07:10, Greg Wooledge wrote:
On Mon, Dec 04, 2023 at 06:32:38AM -0500, gene heskett wrote:
On 12/4/23 05:55, Pocket wrote:
ntpq -p
I don't have that on the printer, it is running chrony.

A quick Google search for "chrony equivalent of ntpq" gives me
<https://karloluiten.nl/chrony-status-command-ntpq-p-alternative/>
which says to use "chronyc sources" or "chronyc tracking".


Thank you Greg, both of those initially return a 506 no daemon. so:
root@mkspi:/etc# chronyc sources
506 Cannot talk to daemon
root@mkspi:/etc# chronyc tracking
506 Cannot talk to daemon
root@mkspi:/etc# /etc/init.d/chrony status
● chrony.service - chrony, an NTP client/server
Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2023-12-04 03:21:18 PST; 4h 6min ago
     Docs: man:chronyd(8)
           man:chronyc(1)
           man:chrony.conf(5)
Process: 30074 ExecStart=/usr/sbin/chronyd $DAEMON_OPTS (code=exited, status=0/SUCCESS) Process: 30078 ExecStartPost=/usr/lib/chrony/chrony-helper update-daemon (code=exited, status=0/SUCCESS)
 Main PID: 30076 (code=exited, status=0/SUCCESS)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
root@mkspi:/etc# /etc/init.d/chrony restart
[ ok ] Restarting chrony (via systemctl): chrony.service.
root@mkspi:/etc# /etc/init.d/chrony status
● chrony.service - chrony, an NTP client/server
Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2023-12-04 07:28:18 PST; 3s ago
     Docs: man:chronyd(8)
           man:chronyc(1)
           man:chrony.conf(5)
Process: 6913 ExecStart=/usr/sbin/chronyd $DAEMON_OPTS (code=exited, status=0/SUCCESS) Process: 6917 ExecStartPost=/usr/lib/chrony/chrony-helper update-daemon (code=exited, status=0/SUCCESS)
 Main PID: 6915 (chronyd)
    Tasks: 2 (limit: 998)
   Memory: 692.0K
   CGroup: /system.slice/chrony.service
           ├─6915 /usr/sbin/chronyd -F -1
           └─6916 /usr/sbin/chronyd -F -1

Dec 04 07:28:18 mkspi systemd[1]: Starting chrony, an NTP client/server...
Dec 04 07:28:18 mkspi chronyd[6915]: chronyd version 3.4 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +…6 -DEBUG) Dec 04 07:28:18 mkspi chronyd[6915]: Frequency -5.789 +/- 0.498 ppm read from /var/lib/chrony/chrony.drift
Dec 04 07:28:18 mkspi chronyd[6915]: Loaded seccomp filter
Dec 04 07:28:18 mkspi systemd[1]: Started chrony, an NTP client/server.
Hint: Some lines were ellipsized, use -l to show in full.
root@mkspi:/etc# date
Mon 04 Dec 2023 07:28:49 AM PST
root@mkspi:/etc# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* coyote.coyote.den 2 6 17 42 -22us[ -25us] +/- 41ms
root@mkspi:/etc# chronyc tracking
Reference ID    : C0A84703 (coyote.coyote.den)
Stratum         : 3
Ref time (UTC)  : Mon Dec 04 15:28:24 2023
System time     : 0.000000003 seconds fast of NTP time
Last offset     : -0.000003382 seconds
RMS offset      : 0.000003382 seconds
Frequency       : 5.789 ppm slow
Residual freq   : +4.376 ppm
Skew            : 0.498 ppm
Root delay      : 0.026627216 seconds
Root dispersion : 0.027671944 seconds
Update interval : 2.0 seconds
Leap status     : Normal
root@mkspi:/etc#

Thats says this machine has it hdware clock on utc.
but date is still on PTC
from mkspi, the printer:
root@mkspi:/etc# date
Mon 04 Dec 2023 07:34:59 AM PST
its 10:35 here, still 3 hours off.

So here on coyote: date -u:
Mon Dec  4 15:47:44 UTC 2023
but on mkspi: date -u:
Mon 04 Dec 2023 03:47:16 PM UTC
chrony has been restarted several times on mkspi, the printer
no errors logged in the tcpdump output.

WTH?  Where is that false 12 hour offset coming from?

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis


Reply to: