Re: Chrony without daemon
Rob Janssen <chrony-users-Cohe+2zZ/ftmR6Xm/[email protected]> Tue, 5 Aug 2025 11:28:45 +0200
| Newsgroups | gmane.comp.time.chrony.user |
|---|---|
| Organization | PE1CHL |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------620HPLlO05zGQ8P2lmIObbH6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit You need to provide the -h parameter to chronyc. E.g. chronyc -h 1.2.3.4 sources Or: chronyc -h 1.2.3.4 tracking (when the chronyd you want to watch is on a system with IP address 1.2.3.4) Again, you DO NOT need to run the daemon on the system (pod) where you run chronyc. You only need to provide IP connectivity between the two, and to use "cmdallow" in the chronyd configuration file(s) to allow the IP address where chronyc is used. Example: chronyc -h 44.137.72.10 tracking Reference ID : 50505300 (PPS) Stratum : 1 Ref time (UTC) : Tue Aug 05 09:27:29 2025 System time : 0.000000054 seconds slow of NTP time Last offset : +0.000000108 seconds RMS offset : 0.000001205 seconds Frequency : 10.403 ppm fast Residual freq : -0.000 ppm Skew : 0.025 ppm Root delay : 0.000000001 seconds Root dispersion : 0.000025486 seconds Update interval : 16.0 seconds Leap status : Normal Rob On 2025-08-05 10:22, Remush wrote: > I'll try to elaborate more about what I'm trying to achieve. > First of all, I'm very grateful for the detailed and well-explained comments you made. > My objective is to monitor a drift between 3 NTP servers. > > `chronyc sources` provides a wonderful and simple output just for that purpose. > The issue I'm having is the following: > I'm using Openshift as my base, and my solution was to simply set a pod with a chrony image and run the command, > sadly to my understanding, openshift pods doesn't have access to systemd, meaning I can't set a chronyd daemon on the Pod it self. > > "chrony tracking" also returns the error message "506 can't talk with daemon". > Honestly I really think that because of that Openshift limitation I won't find any way to actually run "chronyc sources". > > I'm not completely understanding what it means to run `chronyd -U -x`. > I actually run it successfully, and it created a chronyd.pid, but "chronyc sources" still return "506 Cannot talk to daemon" > Am I missing something? > > בתאריך יום ג׳, 5 באוג׳ 2025 ב-11:04 מאת Rob Janssen <chrony-users-Cohe+2zZ/ftmR6Xm/[email protected]>: > > My guess was that he was attempting monitoring of an existing chronyd outside > his container. > I have done that (way) in the past to monitor time service using nagios. > I just installed (copied) the chronyc binary to the monitoring system, which > itself was running ntpd, and made a check_chrony script that did a > chronyc call (from a perl skeleton available for nagios). > Probably not the most efficient way, but it works. I used "chronyc tracking", > of course with a -h parameter. > > But maybe I am completely wrong guessing his objectives... it is not very > clear from the explanation. > > Rob > > On 2025-08-05 09:20, Mingye Wang wrote: >> So uh Rob gave a good explanation of how chrony works, but honestly: >> this smells like an "XY problem" to me. What are you attempting to do, >> actually, by getting `chronyc sources`? In other words, what >> information do you *really* need? >> --------------620HPLlO05zGQ8P2lmIObbH6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> You need to provide the -h parameter to chronyc.<br> <br> E.g. chronyc -h 1.2.3.4 sources<br> Or: chronyc -h 1.2.3.4 tracking<br> (when the chronyd you want to watch is on a system with IP address 1.2.3.4)<br> <br> Again, you DO NOT need to run the daemon on the system (pod) where you run chronyc.<br> You only need to provide IP connectivity between the two, and to use "cmdallow" in the<br> chronyd configuration file(s) to allow the IP address where chronyc is used.<br> <br> Example: chronyc -h 44.137.72.10 tracking<br> Reference ID : 50505300 (PPS)<br> Stratum : 1<br> Ref time (UTC) : Tue Aug 05 09:27:29 2025<br> System time : 0.000000054 seconds slow of NTP time<br> Last offset : +0.000000108 seconds<br> RMS offset : 0.000001205 seconds<br> Frequency : 10.403 ppm fast<br> Residual freq : -0.000 ppm<br> Skew : 0.025 ppm<br> Root delay : 0.000000001 seconds<br> Root dispersion : 0.000025486 seconds<br> Update interval : 16.0 seconds<br> Leap status : Normal<br> <br> Rob<br> <br> <div class="moz-cite-prefix">On 2025-08-05 10:22, Remush wrote:<br> </div> <blockquote type="cite" cite="mid:CAMEWNSEM3ghOUgWW6_SaxWv85=1JC93aWrN+T0736+bzC7un4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <div dir="rtl"> <div dir="ltr">I'll try to elaborate more about what I'm trying to achieve.<br> </div> <div dir="ltr">First of all, I'm very grateful for the detailed and well-explained comments you made.<br> </div> <div dir="ltr">My objective is to monitor a drift between 3 NTP servers.<br> <br> </div> <div dir="ltr">`chronyc sources` provides a wonderful and simple output just for that purpose.<br> </div> <div dir="ltr">The issue I'm having is the following:<br> </div> <div dir="ltr">I'm using Openshift as my base, and my solution was to simply set a pod with a chrony image and run the command,</div> <div dir="ltr">sadly to my understanding, openshift pods doesn't have access to systemd, meaning I can't set a chronyd daemon on the Pod it self.<br> <br> </div> <div dir="ltr">"chrony tracking" also returns the error message "506 can't talk with daemon".<br> </div> <div dir="ltr">Honestly I really think that because of that Openshift limitation I won't find any way to actually run "chronyc sources".<br> <br> </div> <div dir="ltr">I'm not completely understanding what it means to run `chronyd -U -x`. <br> </div> <div dir="ltr">I actually run it successfully, and it created a chronyd.pid, but "chronyc sources" still return "506 Cannot talk to daemon"</div> <div dir="ltr">Am I missing something? </div> </div> <br> <div class="gmail_quote gmail_quote_container"> <div dir="rtl" class="gmail_attr">בתאריך יום ג׳, 5 באוג׳ 2025 ב-11:04 מאת Rob Janssen <<a href="mailto:chrony-users-Cohe+2zZ/ftmR6Xm/[email protected]" moz-do-not-send="true" class="moz-txt-link-freetext">chrony-users-Cohe+2zZ/ftmR6Xm/[email protected]</a>>:<br> </div> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div> My guess was that he was attempting monitoring of an existing chronyd outside<br> his container.<br> I have done that (way) in the past to monitor time service using nagios.<br> I just installed (copied) the chronyc binary to the monitoring system, which<br> itself was running ntpd, and made a check_chrony script that did a<br> chronyc call (from a perl skeleton available for nagios).<br> Probably not the most efficient way, but it works. I used "chronyc tracking",<br> of course with a -h parameter.<br> <br> But maybe I am completely wrong guessing his objectives... it is not very<br> clear from the explanation.<br> <br> Rob<br> <br> <div>On 2025-08-05 09:20, Mingye Wang wrote:<br> </div> <blockquote type="cite"> <pre>So uh Rob gave a good explanation of how chrony works, but honestly: this smells like an "XY problem" to me. What are you attempting to do, actually, by getting `chronyc sources`? In other words, what information do you *really* need? </pre> </blockquote> </div> </blockquote> </div> </blockquote> <br> </body> </html> --------------620HPLlO05zGQ8P2lmIObbH6-- -- To unsubscribe email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org with "unsubscribe" in the subject. For help email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org with "help" in the subject. Trouble? Email [email protected]