Post by Jahagirdar, BhushanHi,
Is there any way to know if Chrony has updated the system time? I mean an interface, event or a possibility of a callback from Chrony.
Are you interested in all adjustments of the clock or only some of
them like steps or slews largers than some threshold?
The only possibility of a real callback is the mailonchange directive,
which sends email when an adjustement reached a threshold. You could
use the --with-sendmail option to compile chronyd with a different
path to the sendmail binary in order to execute any binary or script
you need.
There might be other possibilities depending on what adjustments you
need to detect:
- monitor the tracking log for new entries
- periodically check the chronyc tracking output
- periodically check the reference timestamp of chronyd operating as
an NTP server
If you need to detect steps only, on Linux you could write a small C
program which creates a timer with infinite timeout and the
TFD_TIMER_CANCEL_ON_SET flag, which will expire when the clock is
stepped by any daemon.
--
Miroslav Lichvar
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.