mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
multicpu1sec-c: fix the /proc/stat parsing
This commit is contained in:
parent
79f72b87fb
commit
99d3a42627
@ -131,7 +131,7 @@ int acquire() {
|
||||
|
||||
char cpu_id[64];
|
||||
long usr, nice, sys, idle, iowait, irq, softirq;
|
||||
sscanf(buffer, "%s %ld %ld %ld %ld %ld", cpu_id, &usr, &nice, &sys, &idle, &iowait, &irq, &softirq);
|
||||
sscanf(buffer, "%s %ld %ld %ld %ld %ld %ld %ld", cpu_id, &usr, &nice, &sys, &idle, &iowait, &irq, &softirq);
|
||||
|
||||
long used = usr + nice + sys + iowait + irq + softirq;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user