diff --git a/p_stat.c b/p_stat.c index 7734a7d..ebb75c5 100644 --- a/p_stat.c +++ b/p_stat.c @@ -33,11 +33,12 @@ struct sammler_plugin plugin; static char *cpu_ds_def = { "DS:user:COUNTER:15:0:U " "DS:nice:COUNTER:15:0:U " - "DS:syst:COUNTER:15:0:U " + "DS:system:COUNTER:15:0:U " "DS:idle:COUNTER:15:0:U " - "DS:wait:COUNTER:15:0:U " - "DS:intr:COUNTER:15:0:U " - "DS:sitr:COUNTER:15:0:U " + "DS:iowait:COUNTER:15:0:U " + "DS:irq:COUNTER:15:0:U " + "DS:softirq:COUNTER:15:0:U " + "DS:steal:COUNTER:15:0:U " }; static char *proc_ds_def = { @@ -108,9 +109,9 @@ static void probe(void) if (numfields >= 8) { probe_submit(&plugin, filename, DS_CPU, - "%s:%s:%s:%s:%s:%s:%s", + "%s:%s:%s:%s:%s:%s:%s:%s", val[1], val[2], val[3], val[4], - val[5], val[6], val[7]); + val[5], val[6], val[7], val[8]); } else { probe_submit(&plugin, filename, DS_CPU, diff --git a/sammler.php b/sammler.php index 4267fa6..d8f9d22 100644 --- a/sammler.php +++ b/sammler.php @@ -304,12 +304,24 @@ function show_rrd($conf) { $cmd .= "--base=1000 --height={$height} --width={$width} --alt-autoscale-max --lower-limit=0 --vertical-label=\"percent\" ". "DEF:a={$rrdfile}:user:AVERAGE ". "DEF:b={$rrdfile}:nice:AVERAGE ". - "DEF:c={$rrdfile}:syst:AVERAGE ". + "DEF:c={$rrdfile}:system:AVERAGE ". "DEF:d={$rrdfile}:idle:AVERAGE ". - "DEF:e={$rrdfile}:wait:AVERAGE ". - "DEF:f={$rrdfile}:intr:AVERAGE ". - "DEF:g={$rrdfile}:sitr:AVERAGE ". - 'AREA:c#FF0000:"System " GPRINT:c:LAST:"Current\:%8.2lf %s" GPRINT:c:AVERAGE:"Average\:%8.2lf %s" GPRINT:c:MAX:"Maximum\:%8.2lf %s\n" '. + "DEF:e={$rrdfile}:iowait:AVERAGE ". + "DEF:f={$rrdfile}:irq:AVERAGE ". + "DEF:g={$rrdfile}:softirq:AVERAGE ". + "DEF:h={$rrdfile}:steal:AVERAGE ". + "DEF:amax={$rrdfile}:user:MAX ". + "DEF:bmax={$rrdfile}:nice:MAX ". + "DEF:cmax={$rrdfile}:system:MAX ". + "DEF:dmax={$rrdfile}:idle:MAX ". + "DEF:emax={$rrdfile}:iowait:MAX ". + "DEF:fmax={$rrdfile}:irq:MAX ". + "DEF:gmax={$rrdfile}:softirq:MAX ". + "DEF:hmax={$rrdfile}:steal:MAX ". + "CDEF:allmax=amax,bmax,cmax,dmax,emax,fmax,gmax,hmax,+,+,+,+,+,+,+ ". + 'AREA:allmax#C0C0C0 LINE:allmax#808080 '. + 'AREA:h#000000:"Stolen " GPRINT:h:LAST:"Current\:%8.2lf %s" GPRINT:h:AVERAGE:"Average\:%8.2lf %s" GPRINT:h:MAX:"Maximum\:%8.2lf %s\n" '. + 'STACK:c#FF0000:"System " GPRINT:c:LAST:"Current\:%8.2lf %s" GPRINT:c:AVERAGE:"Average\:%8.2lf %s" GPRINT:c:MAX:"Maximum\:%8.2lf %s\n" '. 'STACK:f#EA8F00:"IRQ " GPRINT:f:LAST:"Current\:%8.2lf %s" GPRINT:f:AVERAGE:"Average\:%8.2lf %s" GPRINT:f:MAX:"Maximum\:%8.2lf %s\n" '. 'STACK:g#FFFF00:"Soft-IRQ" GPRINT:g:LAST:"Current\:%8.2lf %s" GPRINT:g:AVERAGE:"Average\:%8.2lf %s" GPRINT:g:MAX:"Maximum\:%8.2lf %s\n" '. 'STACK:e#0000FF:"IO-Wait " GPRINT:e:LAST:"Current\:%8.2lf %s" GPRINT:e:AVERAGE:"Average\:%8.2lf %s" GPRINT:e:MAX:"Maximum\:%8.2lf %s\n" '. @@ -361,13 +373,13 @@ function show_rrd($conf) { case 'load': $cmd .= "--base=1000 --height={$height} --width={$width} --alt-autoscale-max --lower-limit=0 --vertical-label=\"load\" ". - "DEF:a={$rrdfile}:1min:AVERAGE ". - "DEF:b={$rrdfile}:5min:AVERAGE ". - "DEF:c={$rrdfile}:15min:AVERAGE ". + "DEF:a={$rrdfile}:1min:MAX ". + "DEF:b={$rrdfile}:5min:MAX ". + "DEF:c={$rrdfile}:15min:MAX ". 'CDEF:x=a,b,c,MAX,MAX '. - 'AREA:a#EACC00:"1 Minute Average " GPRINT:a:LAST:"Current\:%8.2lf %s\n" '. - 'AREA:b#EA8F00:"5 Minute Average " GPRINT:b:LAST:"Current\:%8.2lf %s\n" '. - 'AREA:c#FF0000:"15 Minute Average" GPRINT:c:LAST:"Current\:%8.2lf %s\n" '. + 'AREA:a#EACC00:" 1 Minute Maximum " GPRINT:a:LAST:"Current\:%8.2lf %s\n" '. + 'AREA:b#EA8F00:" 5 Minute Maximum " GPRINT:b:LAST:"Current\:%8.2lf %s\n" '. + 'AREA:c#FF0000:"15 Minute Maximum " GPRINT:c:LAST:"Current\:%8.2lf %s\n" '. 'LINE1:x#404040:"Total"'; break;