mirror of
https://github.com/munin-monitoring/contrib.git
synced 2024-09-10 10:42:43 +02:00
Merge remote branch 'helmut/master'
This commit is contained in:
commit
50b2baaf69
2 changed files with 9 additions and 6 deletions
|
@ -42,7 +42,7 @@ int cpu(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
puts("graph_title CPU usage");
|
puts("graph_title CPU usage");
|
||||||
if(extinfo == 7)
|
if(extinfo >= 7)
|
||||||
puts("graph_order system user nice idle iowait irq softirq");
|
puts("graph_order system user nice idle iowait irq softirq");
|
||||||
else
|
else
|
||||||
puts("graph_order system user nice idle");
|
puts("graph_order system user nice idle");
|
||||||
|
@ -87,7 +87,7 @@ int cpu(int argc, char **argv) {
|
||||||
"user.cdef user,%d,/\n"
|
"user.cdef user,%d,/\n"
|
||||||
"nice.cdef nice,%d,/\n"
|
"nice.cdef nice,%d,/\n"
|
||||||
"idle.cdef idle,%d,/\n", ncpu, ncpu, ncpu, ncpu);
|
"idle.cdef idle,%d,/\n", ncpu, ncpu, ncpu, ncpu);
|
||||||
if(extinfo == 7) {
|
if(extinfo >= 7) {
|
||||||
puts("iowait.label iowait\n"
|
puts("iowait.label iowait\n"
|
||||||
"iowait.draw STACK\n"
|
"iowait.draw STACK\n"
|
||||||
"iowait.min 0");
|
"iowait.min 0");
|
||||||
|
|
|
@ -37,10 +37,13 @@ int interrupts(int argc, char **argv) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
while(fgets(buff, 256, f)) {
|
while(fgets(buff, 256, f)) {
|
||||||
if(!strncmp(buff, "intr ", 5))
|
if(!strncmp(buff, "intr ", 5)) {
|
||||||
printf("intr.value %s", buff+5);
|
buff[5 + strcspn(buff + 5, " \t\n")] = '\0';
|
||||||
else if(!strncmp(buff, "ctxt ", 5))
|
printf("intr.value %s\n", buff+5);
|
||||||
printf("ctx.value %s", buff+5);
|
} else if(!strncmp(buff, "ctxt ", 5)) {
|
||||||
|
buff[5 + strcspn(buff + 5, " \t\n")] = '\0';
|
||||||
|
printf("ctx.value %s\n", buff+5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue