author | Peter Gervai <grin@grin.hu> |
Thu, 06 Nov 2008 14:44:48 +0100 | |
changeset 0 | 55d66efee4e0 |
permissions | -rw-r--r-- |
0
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
1 |
#!/bin/bash |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
2 |
# |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
3 |
# Added --fork compatibility to support multiple control sockets |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
4 |
# |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
5 |
# Original by ahu @ pdns-dev team |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
6 |
# Modified by Daniel Selans <dan.s at hostdime.com> |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
7 |
# 09.02.07 |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
8 |
# |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
9 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
10 |
WWWPREFIX=. |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
11 |
WSIZE=800 |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
12 |
HSIZE=250 |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
13 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
14 |
# only recent rrds offer slope-mode: |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
15 |
GRAPHOPTS=--slope-mode |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
16 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
17 |
function makeGraphs() |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
18 |
{ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
19 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
20 |
if [ $MULTI = 1 ] |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
21 |
then |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
22 |
IMGFILEEND="$3.png" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
23 |
RRDFILEEND="$3.rrd" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
24 |
else |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
25 |
IMGFILEEND="png" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
26 |
RRDFILEEND="rrd" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
27 |
fi |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
28 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
29 |
rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/questions-$2.$IMGFILEEND -w $WSIZE -h $HSIZE -l 0\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
30 |
-t "Questions and answers per second" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
31 |
-v "packets" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
32 |
DEF:questions=pdns_recursor.$RRDFILEEND:questions:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
33 |
DEF:nxdomainanswers=pdns_recursor.$RRDFILEEND:nxdomain-answers:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
34 |
DEF:noerroranswers=pdns_recursor.$RRDFILEEND:noerror-answers:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
35 |
DEF:servfailanswers=pdns_recursor.$RRDFILEEND:servfail-answers:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
36 |
LINE1:questions#0000ff:"questions/s"\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
37 |
AREA:noerroranswers#00ff00:"noerror answers/s" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
38 |
STACK:nxdomainanswers#ffa500:"nxdomain answers/s"\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
39 |
STACK:servfailanswers#ff0000:"servfail answers/s" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
40 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
41 |
rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/tcp-questions-$2.$IMGFILEEND -w $WSIZE -h $HSIZE -l 0\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
42 |
-t "TCP questions and answers per second, unauthorized packets/s" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
43 |
-v "packets" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
44 |
DEF:tcpquestions=pdns_recursor.$RRDFILEEND:tcp-questions:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
45 |
DEF:unauthudp=pdns_recursor.$RRDFILEEND:unauthorized-udp:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
46 |
DEF:unauthtcp=pdns_recursor.$RRDFILEEND:unauthorized-tcp:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
47 |
LINE1:tcpquestions#0000ff:"tcp questions/s" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
48 |
LINE1:unauthudp#ff0000:"udp unauth/s" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
49 |
LINE1:unauthtcp#00ff00:"tcp unauth/s" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
50 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
51 |
rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/packet-errors-$2.$IMGFILEEND -w $WSIZE -h $HSIZE -l 0\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
52 |
-t "Parsing errors per second" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
53 |
-v "packets" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
54 |
DEF:clientparseerrors=pdns_recursor.$RRDFILEEND:client-parse-errors:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
55 |
DEF:serverparseerrors=pdns_recursor.$RRDFILEEND:server-parse-errors:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
56 |
LINE1:clientparseerrors#0000ff:"bad packets from clients" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
57 |
LINE1:serverparseerrors#00ff00:"bad packets from servers" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
58 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
59 |
rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/latencies-$2.$IMGFILEEND -w $WSIZE -h $HSIZE -l 0\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
60 |
-t "Questions answered within latency" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
61 |
-v "questions" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
62 |
DEF:questions=pdns_recursor.$RRDFILEEND:questions:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
63 |
DEF:answers01=pdns_recursor.$RRDFILEEND:answers0-1:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
64 |
DEF:answers110=pdns_recursor.$RRDFILEEND:answers1-10:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
65 |
DEF:answers10100=pdns_recursor.$RRDFILEEND:answers10-100:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
66 |
DEF:answers1001000=pdns_recursor.$RRDFILEEND:answers100-1000:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
67 |
DEF:answersslow=pdns_recursor.$RRDFILEEND:answers-slow:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
68 |
LINE1:questions#0000ff:"questions/s" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
69 |
AREA:answers01#00ff00:"<1 ms" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
70 |
STACK:answers110#0000ff:"<10 ms" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
71 |
STACK:answers10100#00ffff:"<100 ms" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
72 |
STACK:answers1001000#ffff00:"<1000 ms" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
73 |
STACK:answersslow#ff0000:">1000 ms" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
74 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
75 |
rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/qoutq-$2.$IMGFILEEND -w $WSIZE -h $HSIZE -l 0 \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
76 |
-t "Questions/outqueries per second" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
77 |
-v "packets" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
78 |
DEF:questions=pdns_recursor.$RRDFILEEND:questions:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
79 |
DEF:alloutqueries=pdns_recursor.$RRDFILEEND:all-outqueries:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
80 |
LINE1:questions#ff0000:"questions/s"\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
81 |
LINE1:alloutqueries#00ff00:"outqueries/s" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
82 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
83 |
rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/qa-latency-$2.$IMGFILEEND -w $WSIZE -h $HSIZE -l 0 \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
84 |
-t "Questions/answer latency in milliseconds" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
85 |
-v "msec" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
86 |
DEF:qalatency=pdns_recursor.$RRDFILEEND:qa-latency:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
87 |
CDEF:mqalatency=qalatency,1000,/ \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
88 |
LINE1:mqalatency#ff0000:"questions/s" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
89 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
90 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
91 |
rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/timeouts-$2.$IMGFILEEND -w $WSIZE -h $HSIZE -l 0\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
92 |
-t "Outqueries/timeouts per second" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
93 |
-v "events" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
94 |
DEF:alloutqueries=pdns_recursor.$RRDFILEEND:all-outqueries:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
95 |
DEF:outgoingtimeouts=pdns_recursor.$RRDFILEEND:outgoing-timeouts:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
96 |
DEF:throttledout=pdns_recursor.$RRDFILEEND:throttled-out:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
97 |
LINE1:alloutqueries#ff0000:"outqueries/s"\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
98 |
LINE1:outgoingtimeouts#00ff00:"outgoing timeouts/s"\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
99 |
LINE1:throttledout#0000ff:"throttled outqueries/s" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
100 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
101 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
102 |
rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/caches-$2.$IMGFILEEND -w $WSIZE -h $HSIZE -l 0\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
103 |
-t "Cache sizes" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
104 |
-v "entries" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
105 |
DEF:cacheentries=pdns_recursor.$RRDFILEEND:cache-entries:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
106 |
DEF:negcacheentries=pdns_recursor.$RRDFILEEND:negcache-entries:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
107 |
DEF:nsspeedsentries=pdns_recursor.$RRDFILEEND:nsspeeds-entries:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
108 |
DEF:throttleentries=pdns_recursor.$RRDFILEEND:throttle-entries:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
109 |
LINE1:cacheentries#ff0000:"cache entries" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
110 |
LINE1:negcacheentries#0000ff:"negative cache entries" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
111 |
LINE1:nsspeedsentries#00ff00:"NS speeds entries" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
112 |
LINE1:throttleentries#00ff00:"throttle map entries" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
113 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
114 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
115 |
rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/caches2-$2.$IMGFILEEND -w $WSIZE -h $HSIZE -l 0\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
116 |
-t "Cache sizes" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
117 |
-v "entries" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
118 |
DEF:negcacheentries=pdns_recursor.$RRDFILEEND:negcache-entries:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
119 |
DEF:nsspeedsentries=pdns_recursor.$RRDFILEEND:nsspeeds-entries:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
120 |
DEF:throttleentries=pdns_recursor.$RRDFILEEND:throttle-entries:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
121 |
LINE1:negcacheentries#0000ff:"negative cache entries" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
122 |
LINE1:nsspeedsentries#00ff00:"NS speeds entries" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
123 |
LINE1:throttleentries#ffa000:"throttle map entries" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
124 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
125 |
rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/load-$2.$IMGFILEEND -w $WSIZE -h $HSIZE -l 0\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
126 |
-v "MThreads" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
127 |
-t "Concurrent queries" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
128 |
DEF:concurrentqueries=pdns_recursor.$RRDFILEEND:concurrent-queries:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
129 |
LINE1:concurrentqueries#0000ff:"concurrent queries" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
130 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
131 |
rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/hitrate-$2.$IMGFILEEND -w $WSIZE -h $HSIZE -l 0\ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
132 |
-v "percentage" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
133 |
-t "cache hits, cpu load" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
134 |
DEF:cachehits=pdns_recursor.$RRDFILEEND:cache-hits:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
135 |
DEF:cachemisses=pdns_recursor.$RRDFILEEND:cache-misses:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
136 |
DEF:usermsec=pdns_recursor.$RRDFILEEND:user-msec:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
137 |
DEF:sysmsec=pdns_recursor.$RRDFILEEND:sys-msec:AVERAGE \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
138 |
DEF:musermsec=pdns_recursor.$RRDFILEEND:user-msec:MAX \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
139 |
DEF:msysmsec=pdns_recursor.$RRDFILEEND:sys-msec:MAX \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
140 |
CDEF:perc=cachehits,100,*,cachehits,cachemisses,+,/ \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
141 |
CDEF:userperc=usermsec,10,/ \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
142 |
CDEF:sysperc=sysmsec,10,/ \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
143 |
CDEF:totmperc=musermsec,msysmsec,+,10,/ \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
144 |
LINE1:perc#0000ff:"percentage cache hits" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
145 |
LINE1:totmperc#ffff00:"max cpu use" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
146 |
AREA:userperc#ff0000:"user cpu percentage" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
147 |
STACK:sysperc#00ff00:"system cpu percentage" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
148 |
COMMENT:"\l" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
149 |
COMMENT:"Cache hits " \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
150 |
GPRINT:perc:AVERAGE:"avg %-3.1lf%%\t" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
151 |
GPRINT:perc:LAST:"last %-3.1lf%%\t" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
152 |
GPRINT:perc:MAX:"max %-3.1lf%%" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
153 |
COMMENT:"\l" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
154 |
COMMENT:"System cpu " \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
155 |
GPRINT:sysperc:AVERAGE:"avg %-3.1lf%%\t" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
156 |
GPRINT:sysperc:LAST:"last %-3.1lf%%\t" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
157 |
GPRINT:sysperc:MAX:"max %-3.1lf%%\t" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
158 |
COMMENT:"\l" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
159 |
COMMENT:"User cpu " \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
160 |
GPRINT:userperc:AVERAGE:"avg %-3.1lf%%\t" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
161 |
GPRINT:userperc:LAST:"last %-3.1lf%%\t" \ |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
162 |
GPRINT:userperc:MAX:"max %-3.1lf%%" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
163 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
164 |
} |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
165 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
166 |
CHKFORK=`ps -C pdns_recursor --no-headers | wc -l` |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
167 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
168 |
# Quick sanity check |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
169 |
if [ CHKFORK = 0 ] |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
170 |
then |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
171 |
echo "pdns_recursor is not running!" |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
172 |
exit |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
173 |
fi |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
174 |
|
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
175 |
if [ $CHKFORK = 2 ] |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
176 |
then |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
177 |
COUNT=0 |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
178 |
MULTI=1 |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
179 |
while [ $COUNT != $CHKFORK ] |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
180 |
do |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
181 |
makeGraphs 6h 6h $COUNT |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
182 |
makeGraphs 24h day $COUNT |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
183 |
#makeGraphs 7d week $COUNT |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
184 |
#makeGraphs 1m month $COUNT |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
185 |
#makeGraphs 1y year $COUNT |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
186 |
COUNT=$(($COUNT + 1)) |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
187 |
done |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
188 |
else |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
189 |
MULTI=0 |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
190 |
makeGraphs 6h 6h |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
191 |
makeGraphs 24h day |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
192 |
#makeGraphs 7d week |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
193 |
#makeGraphs 1m month |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
194 |
#makeGraphs 1y year |
55d66efee4e0
First import from the web, original tgz seems to have lost
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
195 |
fi |