aboutsummaryrefslogtreecommitdiffstats
path: root/package/soloscli/files
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2012-03-29 09:01:33 +0000
committerJohn Crispin <john@openwrt.org>2012-03-29 09:01:33 +0000
commit433a8d39da5bf322d17b828a33ee890179fd7a15 (patch)
treeb71e0a3b31f5a18c316dd5874e0aaa61547f9dc6 /package/soloscli/files
parent9813679235a40cfcd9126c7dfd27aca00b8576c3 (diff)
downloadupstream-433a8d39da5bf322d17b828a33ee890179fd7a15.tar.gz
upstream-433a8d39da5bf322d17b828a33ee890179fd7a15.tar.bz2
upstream-433a8d39da5bf322d17b828a33ee890179fd7a15.zip
soloscli: Add script to syslog ADSL line stats
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 <dwmw2@infradead.org> SVN-Revision: 31136
Diffstat (limited to 'package/soloscli/files')
-rw-r--r--package/soloscli/files/solos-log-stats19
1 files changed, 19 insertions, 0 deletions
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
+