Skip to content

Add method to wait for time to be synchronized initially #1627

@mcpherrinm

Description

@mcpherrinm

With systemd, I can order targets after the time is synced: https://manpages.debian.org/testing/systemd/systemd-time-wait-sync.service.8.en.html

I would like a similar method to have scripts or other tools block until ntpd-rs has successfully synced (ie, is not stratum 16) and written the time to the kernel successfully.

At least on a system I'm testing on, systemd reported that the time was synced when the ntpd server was shut down and thus couldn't have synced. ntp-ctl status says stratum 16, and my adjtimex test tool says the clock is not synchronized. Systemd does suggest that its time-wait-sync "unreliable" with 3rd party ntp clients, so that checks out.

Indirectly, I can do this via the adjtimex syscall in a generic tool. However, I would appreciate it if this could be supported "out of the box" that allows explicitly waiting for ntpd-rs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions