mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Plugin sockstat-via-procfs: fix style issues
This commit is contained in:
parent
7f3ce96632
commit
86692d7021
1 changed files with 5 additions and 5 deletions
|
@ -20,13 +20,13 @@ fields = (
|
|||
if len(sys.argv) > 1:
|
||||
arg = sys.argv[1]
|
||||
if arg == 'autoconfig':
|
||||
print 'yes'
|
||||
print('yes')
|
||||
sys.exit(0)
|
||||
if arg == 'config':
|
||||
print 'graph_title sockstat'
|
||||
print 'graph_category network'
|
||||
print('graph_title sockstat')
|
||||
print('graph_category network')
|
||||
for name, label in fields:
|
||||
print '%s.label %s' % (name, label)
|
||||
print('%s.label %s' % (name, label))
|
||||
sys.exit(0)
|
||||
|
||||
re_num = re.compile('(\d+)')
|
||||
|
@ -34,6 +34,6 @@ sockstat = open('/proc/net/sockstat').read()
|
|||
numbers = re_num.findall(sockstat)
|
||||
|
||||
for i, (name, label) in enumerate(fields):
|
||||
print '%s.value %s' % (name, numbers[i])
|
||||
print('%s.value %s' % (name, numbers[i]))
|
||||
|
||||
sys.exit(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue