Hi,

I would like to use this opportunity to promote the libpmc library.
https://sf.net/p/linuxptp/

The library provide the functionality of the pmc tool.
It comes with wrapping for python, Perl, Lua, php, ruby.

And runs more then 20 times faster then the original linuxptp pmc tool

Query a single line with all the management TLVs, result:

* Query using linuxptp pmc
real    0m0.117s
user    0m0.010s
sys     0m0.009s

 * Query using libpmc pmc tool
real    0m0.005s
user    0m0.004s
sys     0m0.002s

Using the library and subscribe to NOTIFY_TIME_SYNC.
You can construct the statistics you need, and in a very light way.

The full query line I use for the benchmark is
sudo pmc -u -f /etc/linuxptp/ptp4l.conf  "get ANNOUNCE_RECEIPT_TIMEOUT" "get 
CLOCK_ACCURACY" "get CLOCK_DESCRIPTION" "get CURRENT_DATA_SET" "get 
DEFAULT_DATA_SET" "get DELAY_MECHANISM" "get DOMAIN" "get 
LOG_ANNOUNCE_INTERVAL" "get LOG_MIN_PDELAY_REQ_INTERVAL" "get 
LOG_SYNC_INTERVAL" "get PARENT_DATA_SET" "get PRIORITY1" "get PRIORITY2" "get 
SLAVE_ONLY" "get TIMESCALE_PROPERTIES" "get TIME_PROPERTIES_DATA_SET" "get 
TRACEABILITY_PROPERTIES" "get USER_DESCRIPTION" "get VERSION_NUMBER" "get 
PORT_DATA_SET" "get TIME_STATUS_NP" "get GRANDMASTER_SETTINGS_NP" "get 
PORT_DATA_SET_NP" "get PORT_PROPERTIES_NP" "get PORT_STATS_NP" "get 
SUBSCRIBE_EVENTS_NP" "get SYNCHRONIZATION_UNCERTAIN_NP" "get MASTER_ONLY"


Enjoy
  Erez



-----Original Message-----
From: Richard Cochran <richardcoch...@gmail.com> 
Sent: Thursday, 27 May 2021 15:18
To: Tim Martin <timot...@nvidia.com>
Cc: linuxptp-devel@lists.sourceforge.net
Subject: Re: [Linuxptp-devel] [PATCH] Add new CLOCK_STATS_NP TLV GET to pmc and 
clock

On Tue, May 25, 2021 at 08:28:34PM +0000, Tim Martin wrote:
> Currently there is no way to programmatically access statistics about 
> the clock frequency offset, time delay, or time offset (collectively, 
> the "clock_stats" metrics), except for parsing the ptp4l logs.  One 
> option for time offset would be to poll TLV_TIME_STATUS_NP in regular 
> intervals from a custom client, but that has the disadvantage of 
> either very high poll rates or missed updates which would affect the 
> statistics.

Not if you use the push method.

commit 6d7c090706e76af334185ffcec9cc56d0570e215
Author: Juergen Werner <pogoj...@gmx.net>
Date:   Wed Jan 20 20:11:34 2021 +0100

    Implement push notification for TIME_STATUS_NP
    
    Subscribers to NOTIFY_TIME_SYNC will be notified on every clock
    synchronization.


Thanks,
Richard



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Flinuxptp-devel&amp;data=04%7C01%7Cerez.geva.ext%40siemens.com%7C4cafa709f6fc450b9bf808d92111eef3%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637577183170988648%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=FCB9sCIZHMsI0Qk9WnHX6uC8aW7TKKrko5YwSmlK2Uo%3D&amp;reserved=0


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to