1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Update ntp_packets

This commit is contained in:
d0m84 2019-08-14 08:24:11 +02:00 committed by Lars Kruse
parent d0139a588d
commit 4ee40c8227

View file

@ -86,6 +86,8 @@ stats = dict()
stats_output = subprocess.check_output([cmd, '-c', 'iostats', '-c', 'sysstats'],
universal_newlines=True).splitlines()
# Split the cmd output into key/value pairs
# Lines that can't be splitted into 2 individual elements by delimiter ':' will be skipped
for line in stats_output:
if len(line.split(':')) == 2:
stats[line.split(':')[0]] = int(line.split(':')[1])