Initial commit
This commit is contained in:
commit
529efd53a1
140 changed files with 10310 additions and 0 deletions
66
rrdtools/archive/prove/scripts.orig/bw-adsl.sh
Executable file
66
rrdtools/archive/prove/scripts.orig/bw-adsl.sh
Executable file
|
|
@ -0,0 +1,66 @@
|
|||
#!/bin/sh
|
||||
|
||||
DBASE="/usr/local/www/data/rrdtools/dbase/bw-adsl.rrd"
|
||||
IMG="/usr/local/www/data/rrdtools/pics/bw-adsl.png"
|
||||
SIMG="/usr/local/www/data/rrdtools/pics/small-bw-adsl.png"
|
||||
RRD="/usr/local/bin/rrdtool"
|
||||
SNMPGET="/usr/local/bin/snmpget -v 1 -c public -Oqv localhost"
|
||||
|
||||
|
||||
# RRA = 1 giorno
|
||||
|
||||
# Aggiungere :
|
||||
# RRA:AVERAGE:0.5:288:31
|
||||
# per salvare il report mensile
|
||||
|
||||
# ?
|
||||
# RRA:AVERAGE:0.5:12:24
|
||||
|
||||
if [ ! -f "${DBASE}" ]; then
|
||||
|
||||
${RRD} create ${DBASE} \
|
||||
--start N \
|
||||
--step 300 \
|
||||
DS:adsl_in:COUNTER:600:U:U \
|
||||
DS:adsl_out:COUNTER:600:U:U \
|
||||
RRA:AVERAGE:0.5:1:288
|
||||
fi
|
||||
|
||||
${RRD} update ${DBASE} N:`${SNMPGET} IF-MIB::ifInOctets.4`:`${SNMPGET} IF-MIB::ifOutOctets.4`
|
||||
|
||||
${RRD} graph ${IMG} \
|
||||
--imgformat=PNG \
|
||||
--title="Adsl Bw" \
|
||||
--font DEFAULT:7 \
|
||||
--rigid \
|
||||
--base=1000 \
|
||||
--height=100 \
|
||||
--width=400 \
|
||||
--upper-limit=180000 \
|
||||
--tabwidth=20 \
|
||||
--lower-limit=0 \
|
||||
--vertical-label="KB/sec" \
|
||||
DEF:byte_in="${DBASE}":adsl_in:AVERAGE \
|
||||
DEF:byte_out="${DBASE}":adsl_out:AVERAGE \
|
||||
AREA:byte_in#00CF00:"IN\t" GPRINT:byte_in:LAST:"Last\:%8.2lf %s" GPRINT:byte_in:AVERAGE:"Avg\:%8.2lf %s" GPRINT:byte_in:MAX:"Max\:%8.2lf %s\n" \
|
||||
LINE1:byte_out#FF0000:"OUT\t" GPRINT:byte_out:LAST:"Last\:%8.2lf %s" GPRINT:byte_out:AVERAGE:"Avg\:%8.2lf %s" GPRINT:byte_out:MAX:"Max\:%8.2lf %s\n"
|
||||
|
||||
${RRD} graph ${SIMG} \
|
||||
--imgformat=PNG \
|
||||
--font DEFAULT:5 \
|
||||
--height=50 \
|
||||
--width=200 \
|
||||
--upper-limit=180000 \
|
||||
--tabwidth=20 \
|
||||
--lower-limit=0 \
|
||||
--no-legend \
|
||||
DEF:byte_in="${DBASE}":adsl_in:AVERAGE \
|
||||
DEF:byte_out="${DBASE}":adsl_out:AVERAGE \
|
||||
AREA:byte_in#00CF00: \
|
||||
LINE1:byte_out#FF0000:
|
||||
|
||||
|
||||
# Optionals
|
||||
# HRULE:150000#FF0000:"MAX possible speed"
|
||||
# CDEF:byte_in=in,8,* \
|
||||
# CDEF:byte_out=out,8,* \
|
||||
79
rrdtools/archive/prove/scripts.orig/conn-server.sh
Executable file
79
rrdtools/archive/prove/scripts.orig/conn-server.sh
Executable file
|
|
@ -0,0 +1,79 @@
|
|||
#!/bin/sh
|
||||
|
||||
DBASE="/usr/local/www/data/rrdtools/dbase/conn-server.rrd"
|
||||
IMG="/usr/local/www/data/rrdtools/pics/conn-server.png"
|
||||
SIMG="/usr/local/www/data/rrdtools/pics/small-conn-server.png"
|
||||
RRD="/usr/local/bin/rrdtool"
|
||||
SNMPGET="/usr/local/bin/snmpget -v 1 -c public -Oqv localhost"
|
||||
|
||||
|
||||
# RRA = 1 giorno
|
||||
|
||||
# Aggiungere :
|
||||
# RRA:AVERAGE:0.5:288:31
|
||||
# per salvare il report mensile
|
||||
|
||||
# ?
|
||||
# RRA:AVERAGE:0.5:12:24
|
||||
|
||||
if [ ! -f "${DBASE}" ]; then
|
||||
|
||||
${RRD} create ${DBASE} \
|
||||
--start N \
|
||||
--step 300 \
|
||||
DS:conn_estab:GAUGE:600:U:U \
|
||||
DS:conn_active:COUNTER:600:U:U \
|
||||
DS:conn_passive:COUNTER:600:U:U \
|
||||
DS:conn_fails:COUNTER:600:U:U \
|
||||
DS:conn_reset:COUNTER:600:U:U \
|
||||
RRA:AVERAGE:0.5:1:288
|
||||
fi
|
||||
|
||||
${RRD} update ${DBASE} N:`${SNMPGET} TCP-MIB::tcpCurrEstab.0`:`${SNMPGET} TCP-MIB::tcpActiveOpens.0`:`${SNMPGET} TCP-MIB::tcpPassiveOpens.0`:`${SNMPGET} TCP-MIB::tcpAttemptFails.0`:`${SNMPGET} TCP-MIB::tcpEstabResets.0`
|
||||
|
||||
${RRD} graph ${IMG} \
|
||||
--imgformat=PNG \
|
||||
--title="Connections" \
|
||||
--font DEFAULT:7 \
|
||||
--rigid \
|
||||
--base=1000 \
|
||||
--height=100 \
|
||||
--width=400 \
|
||||
--tabwidth=20 \
|
||||
--lower-limit=0 \
|
||||
--vertical-label="Connections" \
|
||||
DEF:estab="${DBASE}":conn_estab:AVERAGE \
|
||||
DEF:active="${DBASE}":conn_active:AVERAGE \
|
||||
DEF:passive="${DBASE}":conn_passive:AVERAGE \
|
||||
DEF:fails="${DBASE}":conn_fails:AVERAGE \
|
||||
DEF:reset="${DBASE}":conn_reset:AVERAGE \
|
||||
LINE1:estab#002A97:"TCP Estab\t" GPRINT:estab:LAST:"Last\:%4.0lf %s\t" GPRINT:estab:AVERAGE:"Avg\:%4.0lf %s\t" GPRINT:estab:MAX:"Max\:%4.0lf %s\n" \
|
||||
LINE1:active#00CF00:"TCP Active\t" GPRINT:active:LAST:"Last\:%4.0lf %s\t" GPRINT:active:AVERAGE:"Avg\:%4.0lf %s\t" GPRINT:active:MAX:"Max\:%4.0lf %s\n" \
|
||||
LINE1:passive#FF0000:"TCP Passive\t" GPRINT:passive:LAST:"Last\:%4.0lf %s\t" GPRINT:passive:AVERAGE:"Avg\:%4.0lf %s\t" GPRINT:passive:MAX:"Max\:%4.0lf %s\n" \
|
||||
LINE1:fails#FF00FF:"TCP Fails\t" GPRINT:fails:LAST:"Last\:%4.0lf %s\t" GPRINT:fails:AVERAGE:"Avg\:%4.0lf %s\t" GPRINT:fails:MAX:"Max\:%4.0lf %s\n" \
|
||||
LINE1:reset#009999:"TCP Reset\t" GPRINT:reset:LAST:"Last\:%4.0lf %s\t" GPRINT:reset:AVERAGE:"Avg\:%4.0lf %s\t" GPRINT:reset:MAX:"Max\:%4.0lf %s\n"
|
||||
|
||||
|
||||
${RRD} graph ${SIMG} \
|
||||
--imgformat=PNG \
|
||||
--font DEFAULT:5 \
|
||||
--height=50 \
|
||||
--width=200 \
|
||||
--tabwidth=20 \
|
||||
--lower-limit=0 \
|
||||
--no-legend \
|
||||
DEF:estab="${DBASE}":conn_estab:AVERAGE \
|
||||
DEF:active="${DBASE}":conn_active:AVERAGE \
|
||||
DEF:passive="${DBASE}":conn_passive:AVERAGE \
|
||||
DEF:fails="${DBASE}":conn_fails:AVERAGE \
|
||||
DEF:reset="${DBASE}":conn_reset:AVERAGE \
|
||||
LINE1:estab#002A97:\
|
||||
LINE1:active#00CF00:\
|
||||
LINE1:passive#FF0000:\
|
||||
LINE1:fails#FF00FF:\
|
||||
LINE1:reset#009999:\
|
||||
|
||||
# Optionals
|
||||
# HRULE:150000#FF0000:"MAX possible speed"
|
||||
# CDEF:byte_in=in,8,* \
|
||||
# CDEF:byte_out=out,8,* \
|
||||
50
rrdtools/archive/prove/scripts.orig/temp-hd.sh
Executable file
50
rrdtools/archive/prove/scripts.orig/temp-hd.sh
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/sh
|
||||
|
||||
DBASE="/usr/local/www/data/rrdtools/dbase/temp-hd.rrd"
|
||||
IMG="/usr/local/www/data/rrdtools/pics/temp-hd.png"
|
||||
SIMG="/usr/local/www/data/rrdtools/pics/small-temp-hd.png"
|
||||
RRD="/usr/local/bin/rrdtool"
|
||||
TEMP=`/usr/local/sbin/smartctl -a /dev/ad0 | /usr/bin/grep Temperature_Celsius | /usr/bin/cut -c 88-89`
|
||||
|
||||
# RRA = 1 giorno
|
||||
|
||||
# Aggiungere :
|
||||
# RRA:AVERAGE:0.5:288:31
|
||||
# per salvare il report mensile
|
||||
|
||||
if [ ! -f "${DBASE}" ]; then
|
||||
|
||||
${RRD} create ${DBASE} \
|
||||
--start N \
|
||||
--step 300 \
|
||||
DS:temp_hd:GAUGE:600:U:U \
|
||||
RRA:AVERAGE:0.5:1:288
|
||||
fi
|
||||
|
||||
${RRD} update ${DBASE} N:${TEMP}
|
||||
|
||||
${RRD} graph ${IMG} \
|
||||
--imgformat=PNG \
|
||||
--title="HD Temperature" \
|
||||
--font LEGEND:7 \
|
||||
--rigid \
|
||||
--base=1000 \
|
||||
--height=100 \
|
||||
--width=400 \
|
||||
--upper-limit=100 \
|
||||
--tabwidth=20 \
|
||||
--lower-limit=0 \
|
||||
--vertical-label="celsius" \
|
||||
DEF:temp="${DBASE}":temp_hd:AVERAGE \
|
||||
AREA:temp#00CF00:"TEMP\t" GPRINT:temp:LAST:"Last\:%4.0lf %s" GPRINT:temp:AVERAGE:"Avg\:%4.0lf %s" GPRINT:temp:MAX:"Max\:%4.0lf %s"
|
||||
|
||||
${RRD} graph ${SIMG} \
|
||||
--imgformat=PNG \
|
||||
--font DEFAULT:5 \
|
||||
--height=50 \
|
||||
--width=200 \
|
||||
--tabwidth=20 \
|
||||
--lower-limit=0 \
|
||||
--no-legend \
|
||||
DEF:temp="${DBASE}":temp_hd:AVERAGE \
|
||||
AREA:temp#00CF00:
|
||||
Loading…
Add table
Add a link
Reference in a new issue