mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-16 18:11:53 +02:00
[package] 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31136 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d0c7c3d907
commit
7395b3c247
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=soloscli
|
PKG_NAME:=soloscli
|
||||||
PKG_VERSION:=0.11
|
PKG_VERSION:=0.11
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=solos-pci-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=solos-pci-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@SF/openadsl
|
PKG_SOURCE_URL:=@SF/openadsl
|
||||||
@ -37,6 +37,7 @@ endef
|
|||||||
define Package/soloscli/install
|
define Package/soloscli/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/soloscli/soloscli $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/soloscli/soloscli $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) ./files/solos-log-stats $(1)/usr/bin/
|
||||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/atm
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/atm
|
||||||
$(INSTALL_DATA) ./files/etc/hotplug.d/atm/15-solos-init $(1)/etc/hotplug.d/atm/
|
$(INSTALL_DATA) ./files/etc/hotplug.d/atm/15-solos-init $(1)/etc/hotplug.d/atm/
|
||||||
endef
|
endef
|
||||||
|
19
package/soloscli/files/solos-log-stats
Normal file
19
package/soloscli/files/solos-log-stats
Normal file
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user