Machine-Readable Long-Term Stats

Enhanced PTP User Guide (UG1602)

Document ID
UG1602
Release Date
2023-04-07
Revision
1.1 English

Long-term statistical data is available in the /var/lib/sfptpd directory where there is a stats file for every sync_module or local clock. For example:

stats-000f:53ff:fe44:5566
stats-000f:53ff:fe44:5566.json
stats-ntp
stats-ntp.json
stats-ptp1
stats-ptp1.json
stats-system
stats-system.json

Plain text and JSON formatted files are automatically generated by sfptpd and can be read by any standard JSON viewer application. Text files and JSON files contain exactly the same data.

Long-term stats files are updated every 60 seconds and retain stats data for up to 3 weeks. Stats files include counters for all ALL PTP messages sent/received by sfptpd.