]> granicus.if.org Git - pdns/commitdiff
add packetcache statistics, plus 'unexpected' counts, plus fix up some confusing...
authorBert Hubert <bert.hubert@netherlabs.nl>
Sun, 10 Jan 2010 08:24:35 +0000 (08:24 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sun, 10 Jan 2010 08:24:35 +0000 (08:24 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1495 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/tools/rrd/create
pdns/tools/rrd/makegraphs
pdns/tools/rrd/update

index 2481ce22be7e367073e700d9dad81506e3f3a9c7..1a8c89de9c821e84430de5307e34d8282930eb52 100755 (executable)
@@ -6,6 +6,7 @@ rrdtool create pdns_recursor.rrd -s $UPDATE_INTERVAL \
 DS:questions:COUNTER:600:0:100000 \
 DS:tcp-questions:COUNTER:600:0:100000 \
 DS:cache-entries:GAUGE:600:0:U \
+DS:packetcache-entries:GAUGE:600:0:U \
 DS:throttle-entries:GAUGE:600:0:U \
 DS:concurrent-queries:GAUGE:600:0:50000 \
 DS:noerror-answers:COUNTER:600:0:100000 \
@@ -19,6 +20,8 @@ DS:negcache-entries:GAUGE:600:0:U \
 DS:all-outqueries:COUNTER:600:0:100000 \
 DS:cache-hits:COUNTER:600:0:100000 \
 DS:cache-misses:COUNTER:600:0:100000 \
+DS:packetcache-hits:COUNTER:600:0:100000 \
+DS:packetcache-misses:COUNTER:600:0:100000 \
 DS:answers0-1:COUNTER:600:0:100000 \
 DS:answers1-10:COUNTER:600:0:100000 \
 DS:answers10-100:COUNTER:600:0:100000 \
@@ -27,6 +30,7 @@ DS:answers-slow:COUNTER:600:0:100000 \
 DS:qa-latency:GAUGE:600:0:10000000 \
 DS:user-msec:COUNTER:600:0:2000 \
 DS:uptime:GAUGE:600:0:U \
+DS:unexpected-packets:COUNTER:600:0:1000000 \
 DS:client-parse-errors:COUNTER:600:0:1000000 \
 DS:server-parse-errors:COUNTER:600:0:1000000 \
 DS:unauthorized-udp:COUNTER:600:0:1000000 \
index 43a3301a081cb9f9fd87d4d1497614978bd43c62..915fdfc94584d98ef840750cec9db15b5114861b 100755 (executable)
@@ -35,22 +35,26 @@ function makeGraphs()
        -v "packets" \
        DEF:clientparseerrors=pdns_recursor.rrd:client-parse-errors:AVERAGE  \
        DEF:serverparseerrors=pdns_recursor.rrd:server-parse-errors:AVERAGE  \
+       DEF:unexpected=pdns_recursor.rrd:unexpected-packets:AVERAGE  \
         LINE1:clientparseerrors#0000ff:"bad packets from clients" \
-        LINE1:serverparseerrors#00ff00:"bad packets from servers" 
+        LINE1:serverparseerrors#00ff00:"bad packets from servers" \
+        LINE1:unexpected#ff0000:"unexpected packets from servers"         
 
   rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/latencies-$2.png -w $WSIZE -h $HSIZE -l 0\
        -t "Questions answered within latency" \
        -v "questions" \
        DEF:questions=pdns_recursor.rrd:questions:AVERAGE  \
+        DEF:answers00=pdns_recursor.rrd:packetcache-hits:AVERAGE \
         DEF:answers01=pdns_recursor.rrd:answers0-1:AVERAGE \
         DEF:answers110=pdns_recursor.rrd:answers1-10:AVERAGE \
         DEF:answers10100=pdns_recursor.rrd:answers10-100:AVERAGE \
         DEF:answers1001000=pdns_recursor.rrd:answers100-1000:AVERAGE \
         DEF:answersslow=pdns_recursor.rrd:answers-slow:AVERAGE \
         LINE1:questions#0000ff:"questions/s" \
-        AREA:answers01#00ff00:"<1 ms" \
+        AREA:answers00#00ff00:"<<1 ms" \
+        STACK:answers01#00fff0:"<1 ms" \
         STACK:answers110#0000ff:"<10 ms" \
-        STACK:answers10100#00ffff:"<100 ms" \
+        STACK:answers10100#ff9900:"<100 ms" \
         STACK:answers1001000#ffff00:"<1000 ms" \
         STACK:answersslow#ff0000:">1000 ms"       
 
@@ -85,13 +89,15 @@ function makeGraphs()
        -t "Cache sizes" \
        -v "entries" \
        DEF:cacheentries=pdns_recursor.rrd:cache-entries:AVERAGE  \
+       DEF:packetcacheentries=pdns_recursor.rrd:packetcache-entries:AVERAGE  \
        DEF:negcacheentries=pdns_recursor.rrd:negcache-entries:AVERAGE  \
        DEF:nsspeedsentries=pdns_recursor.rrd:nsspeeds-entries:AVERAGE  \
        DEF:throttleentries=pdns_recursor.rrd:throttle-entries:AVERAGE  \
         LINE1:cacheentries#ff0000:"cache entries" \
+        LINE1:packetcacheentries#ffff00:"packet cache entries" \
         LINE1:negcacheentries#0000ff:"negative cache entries" \
         LINE1:nsspeedsentries#00ff00:"NS speeds entries" \
-        LINE1:throttleentries#00ff00:"throttle map entries" 
+        LINE1:throttleentries#00fff0:"throttle map entries" 
         
 
   rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/caches2-$2.png -w $WSIZE -h $HSIZE -l 0\
@@ -115,15 +121,19 @@ function makeGraphs()
        -t "cache hits, cpu load" \
        DEF:cachehits=pdns_recursor.rrd:cache-hits:AVERAGE  \
        DEF:cachemisses=pdns_recursor.rrd:cache-misses:AVERAGE  \
+       DEF:packetcachehits=pdns_recursor.rrd:packetcache-hits:AVERAGE  \
+       DEF:packetcachemisses=pdns_recursor.rrd:packetcache-misses:AVERAGE  \
        DEF:usermsec=pdns_recursor.rrd:user-msec:AVERAGE \
        DEF:sysmsec=pdns_recursor.rrd:sys-msec:AVERAGE \
        DEF:musermsec=pdns_recursor.rrd:user-msec:MAX \
        DEF:msysmsec=pdns_recursor.rrd:sys-msec:MAX \
        CDEF:perc=cachehits,100,*,cachehits,cachemisses,+,/ \
+       CDEF:packetperc=packetcachehits,100,*,packetcachehits,packetcachemisses,+,/ \
        CDEF:userperc=usermsec,10,/ \
        CDEF:sysperc=sysmsec,10,/ \
        CDEF:totmperc=musermsec,msysmsec,+,10,/ \
         LINE1:perc#0000ff:"percentage cache hits"  \
+        LINE1:packetperc#ff00ff:"percentage packetcache hits"  \
         LINE1:totmperc#ffff00:"max cpu use" \
         AREA:userperc#ff0000:"user cpu percentage" \
         STACK:sysperc#00ff00:"system cpu percentage" \
@@ -133,6 +143,11 @@ function makeGraphs()
         GPRINT:perc:LAST:"last %-3.1lf%%\t" \
         GPRINT:perc:MAX:"max %-3.1lf%%" \
         COMMENT:"\l" \
+        COMMENT:"Pkt hits   " \
+        GPRINT:packetperc:AVERAGE:"avg %-3.1lf%%\t" \
+        GPRINT:packetperc:LAST:"last %-3.1lf%%\t" \
+        GPRINT:packetperc:MAX:"max %-3.1lf%%" \
+        COMMENT:"\l" \
         COMMENT:"System cpu " \
         GPRINT:sysperc:AVERAGE:"avg %-3.1lf%%\t" \
         GPRINT:sysperc:LAST:"last %-3.1lf%%\t" \
index d289e98151e406136cc8133542d2593344d0919f..9a05e084aee1d4bb4ccda1a790738adc3cd5b947 100755 (executable)
@@ -1,16 +1,17 @@
 #!/bin/bash
-#SOCKETDIR=/home/ahu/work/pdns/pdns/pdns/    
-SOCKETDIR=/var/run/
+SOCKETDIR=/home/ahu/work/pdns/trunk/pdns/pdns/pdns-recursor-3.2-testing
+#SOCKETDIR=/var/run/
 
 TSTAMP=$(date +%s)
 
-VARIABLES="questions tcp-questions cache-entries concurrent-queries\
+VARIABLES="questions tcp-questions cache-entries packetcache-entries concurrent-queries\
           nxdomain-answers noerror-answers\
           servfail-answers tcp-outqueries\
           outgoing-timeouts nsspeeds-entries negcache-entries all-outqueries throttled-out\
+          packetcache-hits packetcache-misses  \
           cache-hits cache-misses answers0-1 answers1-10 answers10-100 answers100-1000 answers-slow\
        qa-latency throttle-entries sys-msec user-msec unauthorized-udp unauthorized-tcp client-parse-errors\
-       server-parse-errors uptime"
+       server-parse-errors uptime unexpected-packets"
 
 UVARIABLES=$(echo $VARIABLES | tr '[a-z]' '[A-Z]' | tr - _ )