Changeset 2352

Show
Ignore:
Timestamp:
08/18/09 01:58:18 (2 years ago)
Author:
bldewolf
Message:

As per a mailing list thread, change Linux cpu plugin to not set max for any fields because recent kernels are inaccurate to the point where a single field can edge just slightly over the calculated max if it is using all of the processor time (for example, the idle state can trigger this). Without removing the max, the affected fields have gaps, creating confusing graphs.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plugins/node.d.linux/cpu.in

    r2293 r2352  
    7878 
    7979        NCPU=$(egrep '^cpu[0-9]+ ' /proc/stat | wc -l) 
    80         MAX=$(($NCPU * 100)) 
    8180        if [ "$scaleto100" = "yes" ]; then 
    8281                graphlimit=100 
    8382        else 
    84                 graphlimit=$MAX 
     83                graphlimit=$(($NCPU * 100)) 
    8584        fi 
    8685        echo 'graph_title CPU usage' 
     
    9493        echo 'system.label system' 
    9594        echo 'system.draw AREA' 
    96         echo "system.max $MAX" 
    9795        echo 'system.min 0' 
    9896        echo 'system.type DERIVE' 
     
    10199        echo 'user.draw STACK' 
    102100        echo 'user.min 0' 
    103         echo "user.max $MAX" 
    104101        echo 'user.type DERIVE' 
    105102        echo 'user.info CPU time spent by normal programs and daemons' 
     
    107104        echo 'nice.draw STACK' 
    108105        echo 'nice.min 0' 
    109         echo "nice.max $MAX" 
    110106        echo 'nice.type DERIVE' 
    111107        echo 'nice.info CPU time spent by nice(1)d programs' 
     
    113109        echo 'idle.draw STACK' 
    114110        echo 'idle.min 0' 
    115         echo "idle.max $MAX" 
    116111        echo 'idle.type DERIVE' 
    117112        echo 'idle.info Idle CPU time' 
     
    133128                echo 'iowait.draw STACK' 
    134129                echo 'iowait.min 0' 
    135                 echo "iowait.max $MAX" 
    136130                echo 'iowait.type DERIVE' 
    137131                echo 'iowait.info CPU time spent waiting for I/O operations to finish when there is nothing else to do.' 
     
    139133                echo 'irq.draw STACK' 
    140134                echo 'irq.min 0' 
    141                 echo "irq.max $MAX" 
    142135                echo 'irq.type DERIVE' 
    143136                echo 'irq.info CPU time spent handling interrupts' 
     
    145138                echo 'softirq.draw STACK' 
    146139                echo 'softirq.min 0' 
    147                 echo "softirq.max $MAX" 
    148140                echo 'softirq.type DERIVE' 
    149141                echo 'softirq.info CPU time spent handling "batched" interrupts' 
     
    164156                echo 'steal.draw STACK' 
    165157                echo 'steal.min 0' 
    166                 echo "steal.max $MAX" 
    167158                echo 'steal.type DERIVE' 
    168159                echo 'steal.info The time that a virtual CPU had runnable tasks, but the virtual CPU itself was not running'