Dauert noch n bissl bis ich das komplett fertig habe, aber hier landet dann alles
![:) :)](./images/smilies/icon_smile.gif)
Ja. Ich habe meinen ESXi gerade erst umgestellt. Werde dir die Dateien im Laufe der Nacht (muss heute Nacht arbeitendasnacht hat geschrieben:Moinmoin!
Das ist ein wirklich sehr interessantes Projekt! Alle Achtung, was Ihr da schon auf die Beine gestellt habt. Gibt es noch eine Möglichkeit an die Skripte heran zu kommen? Der Dropbox-Mirror scheint genauso wie fLoo's Seite Offline zu sein
Code: Alles auswählen
Power Level Signal to Noise Ratio
Channel 1: 61.0 dBuV 39.5 dB
Channel 2: 55.7 dBuV 39.5 dB
Channel 3: 60.9 dBuV 39.5 dB
Channel 4: 61.3 dBuV 38.8 dB
Code: Alles auswählen
|--/root/
|--/rrd/
|--/images/
|--/kdg/
|--/temperature/
|--/_backup
Code: Alles auswählen
root@monitor:~# crontab -l
* * * * * /root/rrd/freq_collect.sh
* * * * * /root/rrd/day_combined.sh
* * * * * /root/rrd/day_lower.sh
* * * * * /root/rrd/day_upper.sh
0 0 * * * sh /root/rrd/week_combined.sh
0 0 * * * sh /root/rrd/week_lower.sh
0 0 * * * && sh /root/rrd/week_upper.sh
0 0 * * 0 sh /root/rrd/month_combined.sh
0 0 * * 0 sh /root/rrd/month_lower.sh
0 0 * * 0 sh /root/rrd/month_upper.sh
#### SIGNAL TO NOISE MONITOR ####
* * * * * sh /root/rrd/snr.sh
0 0 * * * sh /root/rrd/snr_week_combined.sh
0 0 * * 0 sh /root/rrd/snr_month_combined.sh
0 0 * * 0 sh /root/rrd/snr_year_combined.sh
#### TEMPERATUR MONITOR ####
* * * * * sh /root/rrd/temp.sh
* * * * * sh /root/rrd/temp_day_combined.sh
0 0 * * * sh /root/rrd/temp_week_combined.sh
0 0 * * 0 sh /root/rrd/temp_month_combined.sh
* * * * * sh /root/rrd/temp_day_inner.sh
* * * * * sh /root/rrd/temp_day_outer.sh
#### FTP PUSH ####
#* * * * * sleep 10 && /root/rrd/ftp.sh
root@monitor:~#
Code: Alles auswählen
rrdtool create 570000000.rrd --step=60 \
DS:bandwidth:GAUGE:105:0:U \
RRA:MIN:0.5:5:288 \
RRA:MIN:0.5:30:336 \
RRA:MIN:0.5:120:372 \
RRA:MIN:0.5:1440:366 \
RRA:MIN:0.5:2880:732 \
RRA:MAX:0.5:5:288 \
RRA:MAX:0.5:30:336 \
RRA:MAX:0.5:120:372 \
RRA:MAX:0.5:1440:366 \
RRA:MAX:0.5:2880:732 \
RRA:AVERAGE:0.5:5:288 \
RRA:AVERAGE:0.5:30:336 \
RRA:AVERAGE:0.5:120:372 \
RRA:AVERAGE:0.5:1440:366 \
RRA:AVERAGE:0.5:2880:732 \
RRA:LAST:0.5:5:288 \
RRA:LAST:0.5:30:336 \
RRA:LAST:0.5:120:372 \
RRA:LAST:0.5:1440:366 \
RRA:LAST:0.5:2880:732
Code: Alles auswählen
#!/bin/sh
freqs="546000000 554000000 562000000 570000000 578000000 586000000 594000000 602000000"
for freq in $freqs
do
dvbtune -f $freq -s 6950 -qam 256 2>&1
bw=`timeout 6 dvbsnoop -s bandwidth 8190 -n 2000 -hideproginfo | awk -F: 'END { print $NF }' | sed 's/^[ \t]*//' | awk '{print $1}')`
rrdtool update /root/rrd/$freq.rrd N:$bw
rrdtool graph /root/rrd/images/kdg/$freq-1day.png DEF:bmin=/root/rrd/$freq.rrd:bandwidth:MIN DEF:bmax=/root/rrd/$freq.rrd:bandwidth:MAX DEF:blast=/root/rrd/$freq.rrd:bandwidth:LAST DEF:bavg=/root/rrd/$freq.rrd:bandwidth:AVERAGE AREA:bavg#53b4ff:"Bandwidth" LINE2:bmax#dcdcdc GPRINT:bmin:MIN:" Min\:%8.2lf %s" GPRINT:bavg:AVERAGE:" Avg\:%8.2lf %s" GPRINT:bmax:MAX:" Max\:%8.2lf %s" GPRINT:blast:LAST:" Last\:%8.2lf %s" -l 0 -u 52000 -w 1200 -h 150 -W monitor.lg-ix.de HRULE:52000#FF0000:"CAP":dashes=5 --slope-mode --vertical-label='kbit per second' --title="21335 Lueneburg | $freq Hz - QAM256 - 6952kHz"
rrdtool graph /root/rrd/images/kdg/$freq-1week.png --start end-1w DEF:bmin=/root/rrd/$freq.rrd:bandwidth:MIN DEF:bmax=/root/rrd/$freq.rrd:bandwidth:MAX DEF:blast=/root/rrd/$freq.rrd:bandwidth:LAST DEF:bavg=/root/rrd/$freq.rrd:bandwidth:AVERAGE AREA:bavg#0090ff:"Bandwidth" LINE2:bmax#dcdcdc GPRINT:bmin:MIN:" Min\:%8.2lf %s" GPRINT:bavg:AVERAGE:" Avg\:%8.2lf %s" GPRINT:bmax:MAX:" Max\:%8.2lf %s" GPRINT:blast:LAST:" Last\:%8.2lf %s" -l 0 -u 52000 -w 1200 -h 150 -W monitor.lg-ix.de HRULE:52000#FF0000:"CAP":dashes=5 --slope-mode --vertical-label='kbit per second' --title="21335 Lueneburg | $freq Hz - QAM256 - 6952kHz"
rrdtool graph /root/rrd/images/kdg/$freq-1month.png --start end-4w DEF:bmin=/root/rrd/$freq.rrd:bandwidth:MIN DEF:bmax=/root/rrd/$freq.rrd:bandwidth:MAX DEF:blast=/root/rrd/$freq.rrd:bandwidth:LAST DEF:bavg=/root/rrd/$freq.rrd:bandwidth:AVERAGE AREA:bavg#0090ff:"Bandwidth" LINE2:bmax#dcdcdc GPRINT:bmin:MIN:" Min\:%8.2lf %s" GPRINT:bavg:AVERAGE:" Avg\:%8.2lf %s" GPRINT:bmax:MAX:" Max\:%8.2lf %s" GPRINT:blast:LAST:" Last\:%8.2lf %s" -l 0 -u 52000 -w 1200 -h 150 -W monitor.lg-ix.de HRULE:52000#FF0000:"CAP":dashes=5 --slope-mode --vertical-label='kbit per second' --title="21335 Lueneburg | $freq Hz - QAM256 - 6952kHz"
sh /root/rrd/day_combined.sh
sh /root/rrd/day_lower.sh
sh /root/rrd/day_upper.sh
done
Code: Alles auswählen
#!/bin/sh
rrdtool graph /root/rrd/images/kdg/combined-1day.png \
--title='21335 Lueneburg | All Channels | 5 Min Average' \
--vertical-label='kbit per second' \
-W monitor.lg-ix.de \
--slope-mode \
-w 576 -h 150 \
-l 0 -u 416000 \
--color BACK#ededed \
--color ARROW#000000 \
DEF:b546min=/root/rrd/546000000.rrd:bandwidth:MIN \
DEF:b546avg=/root/rrd/546000000.rrd:bandwidth:AVERAGE \
DEF:b546max=/root/rrd/546000000.rrd:bandwidth:MAX \
DEF:b546last=/root/rrd/546000000.rrd:bandwidth:LAST \
DEF:b554min=/root/rrd/554000000.rrd:bandwidth:MIN \
DEF:b554avg=/root/rrd/554000000.rrd:bandwidth:AVERAGE \
DEF:b554max=/root/rrd/554000000.rrd:bandwidth:MAX \
DEF:b554last=/root/rrd/554000000.rrd:bandwidth:LAST \
DEF:b562min=/root/rrd/562000000.rrd:bandwidth:MIN \
DEF:b562avg=/root/rrd/562000000.rrd:bandwidth:AVERAGE \
DEF:b562max=/root/rrd/562000000.rrd:bandwidth:MAX \
DEF:b562last=/root/rrd/562000000.rrd:bandwidth:LAST \
DEF:b570min=/root/rrd/570000000.rrd:bandwidth:MIN \
DEF:b570avg=/root/rrd/570000000.rrd:bandwidth:AVERAGE \
DEF:b570max=/root/rrd/570000000.rrd:bandwidth:MAX \
DEF:b570last=/root/rrd/570000000.rrd:bandwidth:LAST \
DEF:b578min=/root/rrd/578000000.rrd:bandwidth:MIN \
DEF:b578avg=/root/rrd/578000000.rrd:bandwidth:AVERAGE \
DEF:b578max=/root/rrd/578000000.rrd:bandwidth:MAX \
DEF:b578last=/root/rrd/578000000.rrd:bandwidth:LAST \
DEF:b586min=/root/rrd/586000000.rrd:bandwidth:MIN \
DEF:b586avg=/root/rrd/586000000.rrd:bandwidth:AVERAGE \
DEF:b586max=/root/rrd/586000000.rrd:bandwidth:MAX \
DEF:b586last=/root/rrd/586000000.rrd:bandwidth:LAST \
DEF:b594min=/root/rrd/594000000.rrd:bandwidth:MIN \
DEF:b594avg=/root/rrd/594000000.rrd:bandwidth:AVERAGE \
DEF:b594max=/root/rrd/594000000.rrd:bandwidth:MAX \
DEF:b594last=/root/rrd/594000000.rrd:bandwidth:LAST \
DEF:b602min=/root/rrd/602000000.rrd:bandwidth:MIN \
DEF:b602avg=/root/rrd/602000000.rrd:bandwidth:AVERAGE \
DEF:b602max=/root/rrd/602000000.rrd:bandwidth:MAX \
DEF:b602last=/root/rrd/602000000.rrd:bandwidth:LAST \
CDEF:bmin=b546min,b554min,b562min,b570min,b578min,b586min,b594min,b602min,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN \
CDEF:bavg=b546avg,b554avg,b562avg,b570avg,b578avg,b586avg,b594avg,b602avg,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN \
CDEF:bmax=b546max,b554max,b562max,b570max,b578max,b586max,b594max,b602max,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN \
CDEF:blast=b546last,b554last,b562last,b570last,b578last,b586last,b594last,b602last,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN \
AREA:300000#c9feb8 \
STACK:76000#f2feb8 \
STACK:40000#fee1b8 \
STACK:84000#feb8b8 \
LINE1:bmax#5f5f5f \
COMMENT:"Separate Channel Statistics\n" \
AREA:b546avg#fffc00:'546 Mhz ' \
GPRINT:b546avg:AVERAGE:"Avg %5.2lf %s " \
GPRINT:b546min:MIN:"Min %5.2lf %s " \
GPRINT:b546max:MAX:"Max %5.2lf %s" \
GPRINT:b546last:LAST:" Last %5.2lf %s\n" \
STACK:b554avg#ffc600:'554 Mhz ' \
GPRINT:b554avg:AVERAGE:"Avg %5.2lf %s " \
GPRINT:b554min:MIN:"Min %5.2lf %s " \
GPRINT:b554max:MAX:"Max %5.2lf %s" \
GPRINT:b554last:LAST:" Last %5.2lf %s\n" \
STACK:b562avg#ffa200:'562 Mhz ' \
GPRINT:b562avg:AVERAGE:"Avg %5.2lf %s " \
GPRINT:b562min:MIN:"Min %5.2lf %s " \
GPRINT:b562max:MAX:"Max %5.2lf %s" \
GPRINT:b562last:LAST:" Last %5.2lf %s\n" \
STACK:b570avg#ff6c00:'570 Mhz ' \
GPRINT:b570avg:AVERAGE:"Avg %5.2lf %s " \
GPRINT:b570min:MIN:"Min %5.2lf %s " \
GPRINT:b570max:MAX:"Max %5.2lf %s" \
GPRINT:b570last:LAST:" Last %5.2lf %s\n" \
STACK:b578avg#00c6ff:'578 Mhz ' \
GPRINT:b578avg:AVERAGE:"Avg %5.2lf %s " \
GPRINT:b578min:MIN:"Min %5.2lf %s " \
GPRINT:b578max:MAX:"Max %5.2lf %s" \
GPRINT:b578last:LAST:" Last %5.2lf %s\n" \
STACK:b586avg#0090ff:'586 Mhz ' \
GPRINT:b586avg:AVERAGE:"Avg %5.2lf %s " \
GPRINT:b586min:MIN:"Min %5.2lf %s " \
GPRINT:b586max:MAX:"Max %5.2lf %s" \
GPRINT:b586last:LAST:" Last %5.2lf %s\n" \
STACK:b594avg#0066ff:'594 Mhz ' \
GPRINT:b594avg:AVERAGE:"Avg %5.2lf %s " \
GPRINT:b594min:MIN:"Min %5.2lf %s " \
GPRINT:b594max:MAX:"Max %5.2lf %s" \
GPRINT:b594last:LAST:" Last %5.2lf %s\n" \
STACK:b602avg#0042ff:'602 Mhz ' \
GPRINT:b602avg:AVERAGE:"Avg %5.2lf %s " \
GPRINT:b602min:MIN:"Min %5.2lf %s " \
GPRINT:b602max:MAX:"Max %5.2lf %s" \
GPRINT:b602last:LAST:" Last %5.2lf %s\n" \
COMMENT:"Overall Channel Statistics\n" \
GPRINT:bavg:AVERAGE:" Avg %5.2lf %s" \
GPRINT:bmin:MIN:" Min %5.2lf %s" \
GPRINT:bmax:MAX:" Max %5.2lf %s" \
GPRINT:blast:LAST:" Last %5.2lf %s\n" \
HRULE:416000#747474:'CAP 416 Mbit/s':dashes=5
Code: Alles auswählen
#!/bin/bash
SRC=$(lynx --dump http://192.168.100.1/Docsis_signal.htm | awk '{print $2}')
M546=$(echo $SRC | sed "s/.*546000000 [0-9]\{2,3\} [0-9.]\{2,4\} \([0-9.]*\).*/\1/")
M554=$(echo $SRC | sed "s/.*554000000 [0-9]\{2,3\} [0-9.]\{2,4\} \([0-9.]*\).*/\1/")
M562=$(echo $SRC | sed "s/.*562000000 [0-9]\{2,3\} [0-9.]\{2,4\} \([0-9.]*\).*/\1/")
M570=$(echo $SRC | sed "s/.*570000000 [0-9]\{2,3\} [0-9.]\{2,4\} \([0-9.]*\).*/\1/")
M578=$(echo $SRC | sed "s/.*578000000 [0-9]\{2,3\} [0-9.]\{2,4\} \([0-9.]*\).*/\1/")
M586=$(echo $SRC | sed "s/.*586000000 [0-9]\{2,3\} [0-9.]\{2,4\} \([0-9.]*\).*/\1/")
M594=$(echo $SRC | sed "s/.*594000000 [0-9]\{2,3\} [0-9.]\{2,4\} \([0-9.]*\).*/\1/")
M602=$(echo $SRC | sed "s/.*602000000 [0-9]\{2,3\} [0-9.]\{2,4\} \([0-9.]*\).*/\1/")
if [ ${#M546} -ne 4 ]; then M546="NaN"; fi
if [ ${#M554} -ne 4 ]; then M554="NaN"; fi
if [ ${#M562} -ne 4 ]; then M562="NaN"; fi
if [ ${#M570} -ne 4 ]; then M570="NaN"; fi
if [ ${#M578} -ne 4 ]; then M578="NaN"; fi
if [ ${#M586} -ne 4 ]; then M586="NaN"; fi
if [ ${#M594} -ne 4 ]; then M594="NaN"; fi
if [ ${#M602} -ne 4 ]; then M602="NaN"; fi
rrdtool update /root/rrd/snr.rrd N:$M546:$M554:$M562:$M570:$M578:$M586:$M594:$M602
sh /root/rrd/snr_day_combined.sh
Code: Alles auswählen
#!/bin/sh
rrdtool graph /root/rrd/images/kdg/snr-combined-1day.png \
--start end-1d \
-l 36 -u 39 -r -Y \
--title='21335 Lueneburg | SNR DownStream | 5 Min Average' \
--vertical-label='SNR in dB' \
-W monitor.lg-ix.de \
-w 576 -h 150 \
--color BACK#ededed \
--color ARROW#000000 \
--color CANVAS#252837 \
--color MGRID#FFFFFF \
DEF:m546min=/root/rrd/snr.rrd:546:MIN \
DEF:m546avg=/root/rrd/snr.rrd:546:AVERAGE \
DEF:m546max=/root/rrd/snr.rrd:546:MAX \
DEF:m546last=/root/rrd/snr.rrd:546:LAST \
DEF:m554min=/root/rrd/snr.rrd:554:MIN \
DEF:m554avg=/root/rrd/snr.rrd:554:AVERAGE \
DEF:m554max=/root/rrd/snr.rrd:554:MAX \
DEF:m554last=/root/rrd/snr.rrd:554:LAST \
DEF:m562min=/root/rrd/snr.rrd:562:MIN \
DEF:m562avg=/root/rrd/snr.rrd:562:AVERAGE \
DEF:m562max=/root/rrd/snr.rrd:562:MAX \
DEF:m562last=/root/rrd/snr.rrd:562:LAST \
DEF:m570min=/root/rrd/snr.rrd:570:MIN \
DEF:m570avg=/root/rrd/snr.rrd:570:AVERAGE \
DEF:m570max=/root/rrd/snr.rrd:570:MAX \
DEF:m570last=/root/rrd/snr.rrd:570:LAST \
DEF:m578min=/root/rrd/snr.rrd:578:MIN \
DEF:m578avg=/root/rrd/snr.rrd:578:AVERAGE \
DEF:m578max=/root/rrd/snr.rrd:578:MAX \
DEF:m578last=/root/rrd/snr.rrd:578:LAST \
DEF:m586min=/root/rrd/snr.rrd:586:MIN \
DEF:m586avg=/root/rrd/snr.rrd:586:AVERAGE \
DEF:m586max=/root/rrd/snr.rrd:586:MAX \
DEF:m586last=/root/rrd/snr.rrd:586:LAST \
DEF:m594min=/root/rrd/snr.rrd:594:MIN \
DEF:m594avg=/root/rrd/snr.rrd:594:AVERAGE \
DEF:m594max=/root/rrd/snr.rrd:594:MAX \
DEF:m594last=/root/rrd/snr.rrd:594:LAST \
DEF:m602min=/root/rrd/snr.rrd:602:MIN \
DEF:m602avg=/root/rrd/snr.rrd:602:AVERAGE \
DEF:m602max=/root/rrd/snr.rrd:602:MAX \
DEF:m602last=/root/rrd/snr.rrd:602:LAST \
COMMENT:"Singal to Noise Ratio\n" \
LINE1:m546avg#fffc00:'546 Mhz ' \
GPRINT:m546avg:AVERAGE:"Avg %5.2lf dB " \
GPRINT:m546min:MIN:"Min %5.2lf dB " \
GPRINT:m546max:MAX:"Max %5.2lf dB" \
GPRINT:m546last:LAST:" Last %5.2lf dB\n" \
LINE1:m554avg#ffc600:'554 Mhz ' \
GPRINT:m554avg:AVERAGE:"Avg %5.2lf dB " \
GPRINT:m554min:MIN:"Min %5.2lf dB " \
GPRINT:m554max:MAX:"Max %5.2lf dB" \
GPRINT:m554last:LAST:" Last %5.2lf dB\n" \
LINE1:m562avg#ffa200:'562 Mhz ' \
GPRINT:m562avg:AVERAGE:"Avg %5.2lf dB " \
GPRINT:m562min:MIN:"Min %5.2lf dB " \
GPRINT:m562max:MAX:"Max %5.2lf dB" \
GPRINT:m562last:LAST:" Last %5.2lf dB\n" \
LINE1:m570avg#ff6c00:'570 Mhz ' \
GPRINT:m570avg:AVERAGE:"Avg %5.2lf dB " \
GPRINT:m570min:MIN:"Min %5.2lf dB " \
GPRINT:m570max:MAX:"Max %5.2lf dB" \
GPRINT:m570last:LAST:" Last %5.2lf dB\n" \
LINE1:m578avg#00c6ff:'578 Mhz ' \
GPRINT:m578avg:AVERAGE:"Avg %5.2lf dB " \
GPRINT:m578min:MIN:"Min %5.2lf dB " \
GPRINT:m578max:MAX:"Max %5.2lf dB" \
GPRINT:m578last:LAST:" Last %5.2lf dB\n" \
LINE1:m586avg#0090ff:'586 Mhz ' \
GPRINT:m586avg:AVERAGE:"Avg %5.2lf dB " \
GPRINT:m586min:MIN:"Min %5.2lf dB " \
GPRINT:m586max:MAX:"Max %5.2lf dB" \
GPRINT:m586last:LAST:" Last %5.2lf dB\n" \
LINE1:m594avg#0066ff:'594 Mhz ' \
GPRINT:m594avg:AVERAGE:"Avg %5.2lf dB " \
GPRINT:m594min:MIN:"Min %5.2lf dB " \
GPRINT:m594max:MAX:"Max %5.2lf dB" \
GPRINT:m594last:LAST:" Last %5.2lf dB\n" \
LINE1:m602avg#0042ff:'602 Mhz ' \
GPRINT:m602avg:AVERAGE:"Avg %5.2lf dB " \
GPRINT:m602min:MIN:"Min %5.2lf dB " \
GPRINT:m602max:MAX:"Max %5.2lf dB" \
GPRINT:m602last:LAST:" Last %5.2lf dB\n"