Debian Codegraph @

utils/munin/renderd_processed

raw
1 #!/bin/sh
2 #
3 # Plugin to monitor the rendering throughput of Renderd
4 #
5 # Parameters:
6 #
7 # config (required)
8 # autoconf (optional - used by munin-config)
9 #
10 # Copyright (c) 2007 - 2023 by mod_tile contributors (see AUTHORS file)
11 #
12 # This program is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU General Public License
14 # as published by the Free Software Foundation; either version 2
15 # of the License, or (at your option) any later version.
16 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; If not, see http://www.gnu.org/licenses/.
24
25 if [ "$1" = "config" ]; then
26
27 echo 'graph_title Renderd throughput'
28 echo 'graph_args --base 1000 -l 0'
29 echo 'graph_vlabel Metatiles per ${graph_period}'
30 echo 'graph_category renderd'
31 echo 'graph_info Displays the number of metatiles being rendered by renderd per ${graph_period}'
32 echo 'req.label Request Queue'
33 echo 'req.type DERIVE'
34 echo 'req.min 0'
35 echo 'req.draw AREA'
36 echo 'req.info Throughput of Metatiles submitted for on the fly rendering'
37 echo 'reqLow.label Low priority request Queue'
38 echo 'reqLow.type DERIVE'
39 echo 'reqLow.min 0'
40 echo 'reqLow.draw STACK'
41 echo 'reqLow.info Throughput of Metatiles submitted low priority for on the fly rendering'
42 echo 'reqPrio.label Priority request Queue'
43 echo 'reqPrio.type DERIVE'
44 echo 'reqPrio.min 0'
45 echo 'reqPrio.draw STACK'
46 echo 'reqPrio.info Throughput of Metatiles submitted high priority for on the fly rendering'
47 echo 'dirty.label Dirty Queue'
48 echo 'dirty.type DERIVE'
49 echo 'dirty.min 0'
50 echo 'dirty.draw STACK'
51 echo 'dirty.info Throughput of dirty Metatiles submitted for re-render'
52 echo 'reqBulk.label Bulk request Queue'
53 echo 'reqBulk.type DERIVE'
54 echo 'reqBulk.min 0'
55 echo 'reqBulk.draw STACK'
56 echo 'reqBulk.info Throughput of Metatiles submitted with background priority'
57 echo 'dropped.label Dropped (x20)'
58 echo 'dropped.type DERIVE'
59 echo 'dropped.min 0'
60 echo 'dropped.draw LINE2'
61 echo 'dropped.info Number of Tiles dropped due to queue overload (x20)'
62 echo 'dropped.cdef dropped,20,/'
63 exit 0
64 fi
65
66 reqprocessed=$(sed -e '/^ReqRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats})
67 reqprioprocessed=$(sed -e '/^ReqPrioRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats})
68 reqpriolowprocessed=$(sed -e '/^ReqLowRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats})
69 dirtprocessed=$(sed -e '/^DirtyRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats})
70 reqbulkprocessed=$(sed -e '/^ReqBulkRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats})
71 dropped=$(sed -e '/^DropedRequest/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats})
72
73 echo "req.value " $reqprocessed
74 echo "reqLow.value " $reqpriolowprocessed
75 echo "reqPrio.value " $reqprioprocessed
76 echo "dirty.value " $dirtprocessed
77 echo "reqBulk.value " $reqbulkprocessed
78 echo "dropped.value " $dropped
79
80 # LocalWords: reqprocessed ReqRendered dirtprocessed DirtyRendered req
81 # LocalWords: DropedRequest