root/trunk/pdns/pdns/tools/rrd/update @ 614

Revision 614, 0.7 KB (checked in by ahu, 7 years ago)

add qa-latency to rrd, add throttle-entries to rrd, add 'QUIT' command,
make cache-size calculation do less work (rrd stats caused packet loss!),
make twice-hourly stats no longer calculate cache size (caused packet loss)

  • Property svn:executable set to *
Line 
1#!/bin/bash
2TSTAMP=$(date +%s)
3cd ../..
4
5VARIABLES="questions cache-entries concurrent-queries\
6           nxdomain-answers noerror-answers\
7           servfail-answers tcp-outqueries\
8           outgoing-timeouts nsspeeds-entries negcache-entries all-outqueries throttled-out\
9           cache-hits cache-misses answers0-1 answers1-10 answers10-100 answers100-1000 answers-slow\
10        qa-latency throttle-entries"
11
12UVARIABLES=$(echo $VARIABLES | tr '[a-z]' '[A-Z]' | tr - _      )
13
14./rec_control GET $VARIABLES |
15(
16  for a in $UVARIABLES
17  do
18          read $a
19  done
20  cd -
21  rrdtool update pdns_recursor.rrd \
22        -t \
23        $(for a in $VARIABLES
24        do
25                echo -n $a:
26        done | sed 's/:$//' ) \
27$TSTAMP$(
28        for a in $UVARIABLES
29        do
30                echo -n :${!a}
31        done)
32)
Note: See TracBrowser for help on using the browser.