Minor changes
This commit is contained in:
parent
db43c985a3
commit
6312f3575a
|
@ -80,14 +80,13 @@ def _parseSysCounters(fn:str):
|
|||
res[m.group(1).lower()] = int(m.group(2))
|
||||
|
||||
m = re.match("cpu([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)", line)
|
||||
res['num'] = int(m.group(1))
|
||||
res['user'] = int(m.group(2))
|
||||
res['nice'] = int(m.group(3))
|
||||
res['system'] = int(m.group(4))
|
||||
res['idle'] = int(m.group(5))
|
||||
res['iowait'] = int(m.group(6))
|
||||
res['irq'] = int(m.group(7))
|
||||
res['softirq'] = int(m.group(8))
|
||||
stat['cpu%d' % int(m.group(1)]['user'] = int(m.group(2))
|
||||
stat['cpu%d' % int(m.group(1)]['nice'] = int(m.group(3))
|
||||
stat['cpu%d' % int(m.group(1)]['system'] = int(m.group(4))
|
||||
stat['cpu%d' % int(m.group(1)]['idle'] = int(m.group(5))
|
||||
stat['cpu%d' % int(m.group(1)]['iowait'] = int(m.group(6))
|
||||
stat['cpu%d' % int(m.group(1)]['irq'] = int(m.group(7))
|
||||
stat['cpu%d' % int(m.group(1)]['softirq'] = int(m.group(8))
|
||||
|
||||
if (m):
|
||||
res[m.group(1)] = int(m.group(2))
|
||||
|
|
Loading…
Reference in New Issue