Skip to content

Commit

Permalink
added the scripts for rrd graph generation
Browse files Browse the repository at this point in the history
  • Loading branch information
jvehent committed Nov 2, 2011
1 parent 83d4df0 commit 53acc8b
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
30 changes: 30 additions & 0 deletions htb_graph_borrowed_1hour.sh
@@ -0,0 +1,30 @@
rrd=/var/lib/htb_collect/borrowed.rrd

rrdtool graph borrowed-1hour.png -s -1h \
-w 600 -h 200 \
-t "Borrowed tokens for the last hour on $(hostname)" \
"DEF:interactive=$rrd:100:AVERAGE" \
'LINE2:interactive#ffe400:interactive:' \
'GPRINT:interactive:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:interactive:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:interactive:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:tcp_acks=$rrd:200:AVERAGE" \
'LINE2:tcp_acks#b535ff:tcp_acks:' \
'GPRINT:tcp_acks:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:tcp_acks:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:tcp_acks:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:ssh=$rrd:300:AVERAGE" \
'LINE2:ssh#1b7b16:ssh:' \
'GPRINT:ssh:MAX:\t\tmax = %6.2lf%Sbps' \
'GPRINT:ssh:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:ssh:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:http_s=$rrd:400:AVERAGE" \
'LINE2:http_s#ff0000:http_s:' \
'GPRINT:http_s:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:http_s:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:http_s:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:default=$rrd:999:AVERAGE" \
'LINE2:default#bcdd94:default:' \
'GPRINT:default:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:default:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:default:AVERAGE:\tavg = %6.2lf%Sbps\n'
30 changes: 30 additions & 0 deletions htb_graph_sent_bits_1hour.sh
@@ -0,0 +1,30 @@
rrd=/var/lib/htb_collect/bits_sent.rrd

rrdtool graph bits_sent-1hour.png -s -1h \
-w 600 -h 200 \
-t "Sent Bits for the last hour on $(hostname)" \
"DEF:interactive=$rrd:100:AVERAGE" \
'AREA:interactive#ffe400:interactive:STACK' \
'GPRINT:interactive:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:interactive:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:interactive:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:tcp_acks=$rrd:200:AVERAGE" \
'AREA:tcp_acks#b535ff:tcp_acks:STACK' \
'GPRINT:tcp_acks:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:tcp_acks:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:tcp_acks:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:ssh=$rrd:300:AVERAGE" \
'AREA:ssh#1b7b16:ssh:STACK' \
'GPRINT:ssh:MAX:\t\tmax = %6.2lf%Sbps' \
'GPRINT:ssh:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:ssh:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:http_s=$rrd:400:AVERAGE" \
'AREA:http_s#ff0000:http_s:STACK' \
'GPRINT:http_s:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:http_s:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:http_s:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:default=$rrd:999:AVERAGE" \
'AREA:default#bcdd94:default:STACK' \
'GPRINT:default:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:default:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:default:AVERAGE:\tavg = %6.2lf%Sbps\n'
30 changes: 30 additions & 0 deletions htb_graph_sent_packets_1hour.sh
@@ -0,0 +1,30 @@
rrd=/var/lib/htb_collect/packet_sent.rrd

rrdtool graph packets_sent-1hour.png -s -1h \
-w 600 -h 200 \
-t "Sent packets for the last hour on $(hostname)" \
"DEF:interactive=$rrd:100:AVERAGE" \
'AREA:interactive#ffe400:interactive:STACK' \
'GPRINT:interactive:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:interactive:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:interactive:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:tcp_acks=$rrd:200:AVERAGE" \
'AREA:tcp_acks#b535ff:tcp_acks:STACK' \
'GPRINT:tcp_acks:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:tcp_acks:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:tcp_acks:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:ssh=$rrd:300:AVERAGE" \
'AREA:ssh#1b7b16:ssh:STACK' \
'GPRINT:ssh:MAX:\t\tmax = %6.2lf%Sbps' \
'GPRINT:ssh:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:ssh:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:http_s=$rrd:400:AVERAGE" \
'AREA:http_s#ff0000:http_s:STACK' \
'GPRINT:http_s:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:http_s:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:http_s:AVERAGE:\tavg = %6.2lf%Sbps\n' \
"DEF:default=$rrd:999:AVERAGE" \
'AREA:default#bcdd94:default:STACK' \
'GPRINT:default:MAX:\tmax = %6.2lf%Sbps' \
'GPRINT:default:LAST:\tlast = %6.2lf%Sbps' \
'GPRINT:default:AVERAGE:\tavg = %6.2lf%Sbps\n'

0 comments on commit 53acc8b

Please sign in to comment.