mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Update ntp_packets
This commit is contained in:
parent
d0139a588d
commit
4ee40c8227
1 changed files with 2 additions and 0 deletions
|
@ -86,6 +86,8 @@ stats = dict()
|
||||||
stats_output = subprocess.check_output([cmd, '-c', 'iostats', '-c', 'sysstats'],
|
stats_output = subprocess.check_output([cmd, '-c', 'iostats', '-c', 'sysstats'],
|
||||||
universal_newlines=True).splitlines()
|
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:
|
for line in stats_output:
|
||||||
if len(line.split(':')) == 2:
|
if len(line.split(':')) == 2:
|
||||||
stats[line.split(':')[0]] = int(line.split(':')[1])
|
stats[line.split(':')[0]] = int(line.split(':')[1])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue