3 # Plugin to monitor the rendering throughput of Renderd
8 # autoconf (optional - used by munin-config)
11 if [ "$1" = "config" ]; then
13 echo 'graph_title Renderd time spent by zoom'
14 echo 'graph_args --base 1000 -l 0'
15 echo 'graph_vlabel time spent per ${graph_period}'
16 echo 'graph_category renderd'
17 echo 'graph_info Displays the amount of time renderd has spent rendering tiles of a given zoom per ${graph_period}'
18 echo 'zoomtime1.label zoom z0 - z8'
19 echo 'zoomtime1.type DERIVE'
20 echo 'zoomtime1.min 0'
21 echo 'zoomtime1.cdef zoomtime1,1000,/'
22 echo 'zoomtime1.draw AREA'
23 echo 'zoomtime1.info Time for Metatiles z0 - z8'
24 echo 'zoomtime2.label zoom z9 - z12'
25 echo 'zoomtime2.type DERIVE'
26 echo 'zoomtime2.min 0'
27 echo 'zoomtime2.cdef zoomtime2,1000,/'
28 echo 'zoomtime2.draw STACK'
29 echo 'zoomtime2.info Time for Metatiles for z9 - z12'
30 echo 'zoomtime3.label zoom z13 - z14'
31 echo 'zoomtime3.type DERIVE'
32 echo 'zoomtime3.min 0'
33 echo 'zoomtime3.cdef zoomtime3,1000,/'
34 echo 'zoomtime3.draw STACK'
35 echo 'zoomtime3.info Time for Metatiles for z13 - z14'
36 echo 'zoomtime4.label zoom z15 - z16'
37 echo 'zoomtime4.type DERIVE'
38 echo 'zoomtime4.min 0'
39 echo 'zoomtime4.cdef zoomtime4,1000,/'
40 echo 'zoomtime4.draw STACK'
41 echo 'zoomtime4.info Time for Metatiles for z15 - z16'
42 echo 'zoomtime5.label zoom z17 - z18'
43 echo 'zoomtime5.type DERIVE'
44 echo 'zoomtime5.min 0'
45 echo 'zoomtime5.cdef zoomtime5,1000,/'
46 echo 'zoomtime5.draw STACK'
47 echo 'zoomtime5.info Time for Metatiles for z17 - z18'
52 req0=`sed -e '/^TimeRenderedZoom00/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
53 req1=`sed -e '/^TimeRenderedZoom01/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
54 req2=`sed -e '/^TimeRenderedZoom02/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
55 req3=`sed -e '/^TimeRenderedZoom03/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
56 req4=`sed -e '/^TimeRenderedZoom04/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
57 req5=`sed -e '/^TimeRenderedZoom05/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
58 req6=`sed -e '/^TimeRenderedZoom06/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
59 req7=`sed -e '/^TimeRenderedZoom07/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
60 req8=`sed -e '/^TimeRenderedZoom08/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
61 req9=`sed -e '/^TimeRenderedZoom09/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
62 req10=`sed -e '/^TimeRenderedZoom10/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
63 req11=`sed -e '/^TimeRenderedZoom11/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
64 req12=`sed -e '/^TimeRenderedZoom12/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
65 req13=`sed -e '/^TimeRenderedZoom13/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
66 req14=`sed -e '/^TimeRenderedZoom14/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
67 req15=`sed -e '/^TimeRenderedZoom15/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
68 req16=`sed -e '/^TimeRenderedZoom16/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
69 req17=`sed -e '/^TimeRenderedZoom17/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
70 req18=`sed -e '/^TimeRenderedZoom18/!d' -e 's/.*: //' -e q /var/run/renderd/renderd.stats`
72 echo "zoomtime1.value " `expr $req0 + $req1 + + $req2 + $req3 + $req4 + $req5 + $req6 + $req7 + $req8`
73 echo "zoomtime2.value " `expr $req9 + $req10 + + $req11 + $req12`
74 echo "zoomtime3.value " `expr $req13 + $req14`
75 echo "zoomtime4.value " `expr $req15 + $req16`
76 echo "zoomtime5.value " `expr $req17 + $req18`