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