Re: [Linuxptp-users] Status file of achieved time synchronization
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Keller, J. E <jac...@in...> - 2014-02-12 18:35:05
|
On Wed, 2014-02-12 at 18:08 +0100, Richard Cochran wrote: > On Wed, Feb 12, 2014 at 03:55:21PM +0000, Koehrer Mathias (ETAS/ESW5) wrote: > > > Starting this application on the slaves is only allowed if the time-synchronization is stable (=the clock offset is below a certain limit and the drift is low). > > With "ptpd2" there is a status file /var/run/ptpd2.status" that will be re-written every second. > > Is anything like that available with linuxptp as well? > > We don't have a file, but instead you can use the management > interface. The 'pmc' management client can be used in a script, > like in the example below. > > Probably you are interested in the CURRENT_DATA_SET, but for gPTP > applications there is also TIME_STATUS_NP. > > HTH, > Richard > --- > #!/bin/bash > > while [ 1 ]; do > clear > ./pmc -u -b 0 "get CURRENT_DATA_SET" > sleep 1 > done You could also look at the pmc code and write your own program that directly requests the data on the management UDS socket, if you prefer not running it in a shell script. This is most likely good enough though. Regards, Jake |