2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Initial version

This commit is contained in:
ian dobson 2009-11-21 18:28:26 +01:00 committed by Steve Schnepp
parent 16b041fdd8
commit 18f4f70e37

58
plugins/other/dvb-signal Executable file
View File

@ -0,0 +1,58 @@
#!/bin/bash
#
# Reads the signal strength from a DVB-c/s/t tuner
#
# (c) 2009 i.dobson@planet-ian.com
#
# Magic markers (optional):
#%# family=auto
#%# capabilities=autoconf suggest
#Change this value to point to the tuner you want to watch
Tuner=1
case $1 in
autoconf|detect)
if [ -e /dev/dvb/adapter$Tuner/ ] ; then
echo yes
exit 0
else
echo "no (dvb tuner $Tuner not found)"
exit 1
fi;;
config)
echo 'graph_title DVB signal strength '
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel Signal Strength % / Errors in 000s'
echo 'graph_category mythtv'
echo 'graph_scale no'
echo "signal.label Signal strength"
echo "signal.draw LINE1"
echo "signal.min 0"
echo "snr.label Signal to noise"
echo "snr.draw LINE1"
echo "snr.min 0"
echo "ber.label Bit error rate (in millions)"
echo "ber.draw LINE1"
echo "ber.min 0"
echo "unc.label Uncorrectable errors (in thousands)"
echo "unc.draw LINE1"
echo "unc.min 0"
exit 0;;
esac
if [ -e /dev/dvb/adapter$Tuner/ ] ; then
check=`femon -H -c 1 -a $Tuner | grep signal `
echo $check | awk '{printf "signal.value %.0f\nsnr.value %.0f\nber.value %.2f\nunc.value %.2f\n\n",$5,$8,$11/1000,$14/1000000}'
else
echo "snr.value 0"
echo "unc.value 0"
echo "ber.value 0"
echo "signal.value 0"
fi
exit 0