5 # - 0 to enable the chart
6 # - 1 to disable the chart
11 load_average_create() {
12 # create a chart with 3 dimensions
14 CHART example.load '' "System Load Average" "load" load load line 500 $update_every
15 DIMENSION load1 '1 min' absolute 1 100
16 DIMENSION load5 '5 mins' absolute 1 100
17 DIMENSION load15 '15 mins' absolute 1 100
23 load_average_update() {
24 # do all the work to collect / calculate the values
26 # remember: KEEP IT SIMPLE AND SHORT
28 # here we parse the system average load
29 # it is decimal (with 2 decimal digits), so we remove the dot and
30 # at the definition we have divisor = 100, to have the graph show the right value
31 loadavg="`cat /proc/loadavg | sed -e "s/\.//g"`"
32 load1=`echo $loadavg | cut -d ' ' -f 1`
33 load5=`echo $loadavg | cut -d ' ' -f 2`
34 load15=`echo $loadavg | cut -d ' ' -f 3`
36 # write the result of the work.