Go to file
Cole Walker 79cd2ee2b0 Correct logic for checking ptp4l source lock
An update to the check_ptp_regular() function resulted in a case where
the ptp collectd plugin could crash by hitting a KeyError.

This fix prevents this by checking that the key is present before trying
to read the GNSS/SMA status. If the key is not present then we know that
GNSS/SMA is not configured for that NIC and we can skip the check.

Additional improvement: Throttle logs related to UTC offset checking.
There is no need to print these logs every cycle as the state is not
expected to change frequently.

Test plan:
Pass: Verify collectd plugin startup and operation
Pass: Verify ptp source lock alarm is raised when ptp master is lost
Pass: Verify UTC logs are throttled

Closes-Bug: 2070071

Change-Id: I60eb1602671b388b54ac5938e4a306e4321742e7
Signed-off-by: Cole Walker <cole.walker@windriver.com>
2024-09-10 11:35:14 -04:00
2019-09-09 14:37:23 -05:00
2019-09-09 14:37:23 -05:00
2019-09-09 14:37:23 -05:00
2022-12-27 01:20:28 +00:00
Description
StarlingX system monitoring and repoting tools
4.8 MiB
Languages
Python 85.6%
Perl 13.3%
Makefile 1%
Shell 0.1%