2
0
Fork 0
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:
Steve Schnepp 2015-03-04 00:00:05 +00:00
parent 79f72b87fb
commit 99d3a42627

View file

@ -131,7 +131,7 @@ int acquire() {
char cpu_id[64]; char cpu_id[64];
long usr, nice, sys, idle, iowait, irq, softirq; 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; long used = usr + nice + sys + iowait + irq + softirq;