File: renderd_queue_time

package info (click to toggle)
libapache2-mod-tile 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,872 kB
  • sloc: cpp: 18,151; ansic: 7,574; sh: 980; makefile: 163; xml: 27
file content (74 lines) | stat: -rwxr-xr-x 2,777 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/sh
#
# Plugin to monitor queue time spent rendering per queue by renderd
#
# Parameters:
#
# 	config   (required)
# 	autoconf (optional - used by munin-config)
#
# Copyright (c) 2007 - 2023 by mod_tile contributors (see AUTHORS file)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; If not, see http://www.gnu.org/licenses/.

if [ "$1" = "config" ]; then

  echo 'graph_title Renderd time spent by queue'
  echo 'graph_args --base 1000 -l 0'
  echo 'graph_vlabel time spent per ${graph_period}'
  echo 'graph_category renderd'
  echo 'reqPrio.label Priority request queue'
  echo 'reqPrio.type DERIVE'
  echo 'reqPrio.cdef reqPrio,1000,/'
  echo 'reqPrio.min 0'
  echo 'reqPrio.draw AREA'
  echo 'reqPrio.info Time for priority request queue'
  echo 'req.label Request queue'
  echo 'req.type DERIVE'
  echo 'req.cdef req,1000,/'
  echo 'req.min 0'
  echo 'req.draw STACK'
  echo 'req.info Time for Request queue'
  echo 'reqLow.label Low priority request queue'
  echo 'reqLow.type DERIVE'
  echo 'reqLow.cdef reqLow,1000,/'
  echo 'reqLow.min 0'
  echo 'reqLow.draw STACK'
  echo 'reqLow.info Time for low priority request queue'
  echo 'dirty.label Dirty queue'
  echo 'dirty.type DERIVE'
  echo 'dirty.cdef dirty,1000,/'
  echo 'dirty.min 0'
  echo 'dirty.draw STACK'
  echo 'dirty.info Time for dirty queue'
  echo 'reqBulk.label Bulk queue'
  echo 'reqBulk.type DERIVE'
  echo 'reqBulk.cdef reqBulk,1000,/'
  echo 'reqBulk.min 0'
  echo 'reqBulk.draw STACK'
  echo 'reqBulk.info Time for bulk queue'
  exit 0
fi

reqTime=$(sed -e '/^TimeRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats})
reqprioTime=$(sed -e '/^TimePrioRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats})
reqpriolowTime=$(sed -e '/^TimeLowRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats})
reqbulkTime=$(sed -e '/^TimeBulkRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats})
dirtyTime=$(sed -e '/^TimeDirtyRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats})

echo "req.value " $reqTime
echo "reqLow.value " $reqpriolowTime
echo "reqPrio.value " $reqprioTime
echo "dirty.value " $dirtyTime
echo "reqBulk.value " $reqbulkTime