Re: [chrony-users] how to know time sync has happened

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Fri, May 15, 2015 at 02:56:39PM +0530, Pratik Pawar wrote:
> Hi All,
>     I am using chrony to keep embedded board system time in sync. The
> reference clock for chrony are PPS & SHM.
> 
>     I want to know the status whether time sync has happened or not in
> application. Is chrony gives any API which I can use in my application to
> know time sync has happened or not.
>   Currently I am taking help of  chrony tracking.log file or chronyc to
> know time sync has happened.

If parsing the log or calling chronyc is not acceptable, you could
implement the tracking command in your program.

The request is one 104 bytes long UDP packet sent to localhost:323.
The first 6 bytes are 0x06 0x01 0x00 0x00 0x00 0x21 and the rest are
all zeroes. The reply is one UDP packet as defined in the candm.h
file, struct CMD_reply with struct RPY_Tracking as data.

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/