Initial commit
This commit is contained in:
commit
529efd53a1
140 changed files with 10310 additions and 0 deletions
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