From 7395b3c2476da89225f17acff91cf233eed02b8f Mon Sep 17 00:00:00 2001 From: blogic Date: Thu, 29 Mar 2012 09:01:33 +0000 Subject: [package] soloscli: Add script to syslog ADSL line stats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I run this from cron. With remote syslog enabled, this means I have a record of ADSL line quality variation — which is useful when diagnosing and reporting faults. Signed-off-by: David Woodhouse git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31136 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/soloscli/files/solos-log-stats | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 package/soloscli/files/solos-log-stats (limited to 'package/soloscli/files') diff --git a/package/soloscli/files/solos-log-stats b/package/soloscli/files/solos-log-stats new file mode 100644 index 0000000000..2b75ee30cd --- /dev/null +++ b/package/soloscli/files/solos-log-stats @@ -0,0 +1,19 @@ +#!/bin/sh + +cd /sys/class/atm/ || exit 1 + +for PORT in solos-pci* ; do + + RXRATE=`cat $PORT/parameters/RxBitRate` + TXRATE=`cat $PORT/parameters/TxBitRate` + RXSNR=`cat $PORT/parameters/LocalSNRMargin | sed "s/ dB//"` + TXSNR=`cat $PORT/parameters/RemoteSNRMargin | sed "s/ dB//"` + RXERR=`cat $PORT/parameters/RSUnCorrectedErrorsDn` + TXERR=`cat $PORT/parameters/RSUnCorrectedErrorsUp` + RXFEC=`cat $PORT/parameters/RSCorrectedErrorsDn` + TXFEC=`cat $PORT/parameters/RSCorrectedErrorsUp` + + echo "$RXRATE $RXSNR $RXERR $RXFEC / $TXRATE $TXSNR $TXERR $TXFEC" | + logger -t $PORT +done + -- cgit v1.2.3