summaryrefslogtreecommitdiff
path: root/package/soloscli/files/solos-log-stats
blob: 2b75ee30cdc0fcb51e4b81ec97295bb79fd6ecd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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