[systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Paul D. DeRocco
What's the simplest way to test if systemd-timesyncd is currently synced to the network, from within an embedded application (running with root privileges)? Is there some single dbus transaction that will give me this answer? -- Ciao, Paul D. DeRocco Paulmailto:pder

Re: [systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Mantas Mikulėnas
On Wed, Feb 20, 2019 at 10:55 AM Paul D. DeRocco wrote: > What's the simplest way to test if systemd-timesyncd is currently synced > to the network, from within an embedded application (running with root > privileges)? Is there some single dbus transaction that will give me this > answer? > Call

Re: [systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Aurelian Melinte
On 20/02/2019 4:18 a.m., Mantas Mikulėnas wrote: On Wed, Feb 20, 2019 at 10:55 AM Paul D. DeRocco mailto:pdero...@ix.netcom.com>> wrote: What's the simplest way to test if systemd-timesyncd is currently synced to the network, from within an embedded application (running with root

Re: [systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Reindl Harald
Am 20.02.19 um 14:00 schrieb Aurelian Melinte: > Some (old?) systems do not have adjtimex: > > $ adjtimex > > -bash: adjtimex: command not found but which systems don't have a package manager to install whatever you want? [harry@srv-rhsoft:~]$ adjtimex bash: adjtimex: command not found [harry

Re: [systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Mantas Mikulėnas
On Wed, Feb 20, 2019 at 3:01 PM Aurelian Melinte wrote: > On 20/02/2019 4:18 a.m., Mantas Mikulėnas wrote: > > On Wed, Feb 20, 2019 at 10:55 AM Paul D. DeRocco > wrote: > >> What's the simplest way to test if systemd-timesyncd is currently synced >> to the network, from within an embedded applic

Re: [systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Bruno Vernay
Isn't ntpstat specific to chrony ?? Conversely, `timedatectl timesync-status` will not work even if the clock is synchro with chronyd.service. Bruno On Wed, Feb 20, 2019 at 2:20 PM Mantas Mikulėnas wrote: > > On Wed, Feb 20, 2019 at 3:01 PM Aurelian Melinte wrote: >> >> On 20/02/2019 4:18 a.m.,

Re: [systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Lennart Poettering
On Mi, 20.02.19 11:18, Mantas Mikulėnas (graw...@gmail.com) wrote: > Call adjtimex(2) and check whether buf.status has STA_UNSYNC (should be > unset when clock is synchronized). > > The systemd-timedated helper service (org.freedesktop.timedate1) exposes > the same flag as the org.freedesktop.time

Re: [systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Lennart Poettering
On Mi, 20.02.19 14:49, Bruno Vernay (brunover...@gmail.com) wrote: > Isn't ntpstat specific to chrony ?? > Conversely, `timedatectl timesync-status` will not work even if the > clock is synchro with chronyd.service. But timedatectl and the busctl cmdline do work if chrony is used. Lennart -- Le

Re: [systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Aurelian Melinte
On 20/02/2019 8:10 a.m., Reindl Harald wrote: Am 20.02.19 um 14:00 schrieb Aurelian Melinte: Some (old?) systems do not have adjtimex: $ adjtimex -bash: adjtimex: command not found but which systems don't have a package manager to install whatever you want? Not an option on our Linux applia

Re: [systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Paul D. DeRocco
> From: Mantas Mikulenas [mailto:graw...@gmail.com] > > Call adjtimex(2) and check whether buf.status has STA_UNSYNC > (should be unset when clock is synchronized). > > The systemd-timedated helper service > (org.freedesktop.timedate1) exposes the same flag as the > org.freedesktop.timedate1.

Re: [systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Mantas Mikulėnas
On Wed, Feb 20, 2019, 19:23 Paul D. DeRocco wrote: > > From: Mantas Mikulenas [mailto:graw...@gmail.com] > > > > Call adjtimex(2) and check whether buf.status has STA_UNSYNC > > (should be unset when clock is synchronized). > > > > The systemd-timedated helper service > > (org.freedesktop.timedat

Re: [systemd-devel] Testing if timesyncd is synced

2019-02-20 Thread Reindl Harald
Am 20.02.19 um 18:36 schrieb Mantas Mikulėnas: > adjtimex(2) the kernel syscall has existed since kernel 2.4.x at least, > possibly even as far back as 1.0. It's older than systemd-timesyncd in > any case. > > Others apparently were talking about /bin/adjtimex the standalone > executable, which

[systemd-devel] [PoC] Codex: FUSE-based journal access

2019-02-20 Thread Vito Caputo
Hello all, This is a little hack I slapped together last night. Maybe someone has already gone further down this rabbit hole than my nascent 253-line PoC explores, if so please refer me to that project and ignore this... `git clone git://git.pengaru.com/codex` I don't have time to work on this