Billion 7402 SNMP MIBs

Rick Harris rickharris at mightylegends.zapto.org
Thu Oct 27 14:02:29 CST 2005


On Thu, 27 Oct 2005 04:24 pm, Jason Tan wrote:
> Rick Harris wrote:
> >Hi all,
> >
> >Been stuffing about for most of today with a Billion 7402VGO modem.
> >
> >Setting up Voip to Nodephone was quick & painless, but now I'm looking at
> >grabbing some stats from the modem via snmp.
> >
> >Have managed to get some download/upload monitoring going using the
> > following MIBs:
> >
> >Download
> >.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInOctets.7
> >
> >Upload
> >.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets.7
> >
> >Ideally I'd also like to be able to monitor CPU % usage, & memory used.
> >So far the only way I've managed to get this info is by connecting to it
> > via
> >
> >serial using minicom, then doing:
> >>console process chips cpu
> >
> >cpu usage: PP 4%, NP 1%
> >
> >>console enable
> >
> >Switching from CLI to console mode - type 'exit' to return
> >
> >>debug memory stats
> >
> >Total memory in use  :   6.6 Mbytes
> >Total memory free    :   2.6 Mbytes
> >Largest free block   :   2.5 Mbytes
> >
> >Has anyone messed around with this & have some MIB entries they can share
> > ? Would imagine the snmp entries would be the same for all Billion 7402
> > models.


Well I haven't yet managed to retrieve the CPU or mem via snmp from this 
modem, but cobbled together a script to retrieve what I think is the main 
relevant info.

An example output:

  BiPAC 7402VGO. H/W: ADSL-A/2/G/VO v1.00 / Argon 4x2 CSP v1.0 (ISOS 9.0) F/W: 
5.03 (24 July 2005)

 System Uptime:					12:40:56.47

 Max. Download speed:			517 kbytes/sec
 Max. Upload speed:				96 kbytes/sec

 Current Download speed:		16.23 kbytes/sec
 Current Upload speed:			1.50 kbytes/sec

 Line Attenuation Local/Remote:	36.5/26.5 db
 SNR Margin Local/Remote:		4.0/5.5 db
 Local Tx Power:					12.5 db


HOST, COMMUNITY & TIMESNAP variables will need adjusting.

---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---

#!/bin/sh

## Small utility to dump statistics from a Billion BiPAC 7402x modem ##
## Requires:    net-snmp -> http://net-snmp.sourceforge.net/

HOST="192.168.1.10"
COMMUNITY="public"
TIMESNAP="0.85"         # This may need tweaking depending on speed of system 
executing script, currently set for a 2GHz system

sysDescr=`snmpget -v2c -c $COMMUNITY $HOST sysDescr.0 | awk -F"STRING:" 
'{print $2}'`
sysUpTime=`snmpget -v2c -c $COMMUNITY $HOST sysUpTime.0 | awk '{print $NF}'`

RxBitRate=`snmpget -v2c -c $COMMUNITY $HOST transmission.94.1.1.4.1.2.4 | awk 
'{print $NF}'`
RxBitRate_kbytes=`perl -le "print int( $RxBitRate / 10000 )"`
RxBitRate_current_snap1=`snmpget -v2c -c $COMMUNITY $HOST 
interfaces.ifTable.ifEntry.ifInOctets.7 | awk '{print $NF}'`
RxBitRate_current_snap2=`sleep "$TIMESNAP"s && snmpget -v2c -c $COMMUNITY 
$HOST interfaces.ifTable.ifEntry.ifInOctets.7 | awk '{print $NF}'`
RxBitRate_current=`perl -le "print ( $RxBitRate_current_snap2 - 
$RxBitRate_current_snap1 )"`
RxBitRate_current_kbytes=`perl -le "printf( '%.2f', $RxBitRate_current / 
1024 )"`

TxBitRate=`snmpget -v2c -c $COMMUNITY $HOST transmission.94.1.1.3.1.8.4 | awk 
'{print $NF}'`
TxBitRate_kbytes=`perl -le "print int( $TxBitRate / 10000 )"`
TxBitRate_current_snap1=`snmpget -v2c -c $COMMUNITY $HOST 
interfaces.ifTable.ifEntry.ifOutOctets.7 | awk '{print $NF}'`
TxBitRate_current_snap2=`sleep "$TIMESNAP"s && snmpget -v2c -c $COMMUNITY 
$HOST interfaces.ifTable.ifEntry.ifOutOctets.7 | awk '{print $NF}'`
TxBitRate_current=`perl -le "print ( $TxBitRate_current_snap2 - 
$TxBitRate_current_snap1 )"`
TxBitRate_current_kbytes=`perl -le "printf( '%.2f', $TxBitRate_current / 
1024 )"`

LocalLineAttn=`snmpget -v2c -c $COMMUNITY $HOST transmission.94.1.1.3.1.5.4 | 
awk '{print $NF}'`
LocalLineAttn_db=`perl -le "printf( '%.1f', $LocalLineAttn / 10 )"`
RemoteLineAttn=`snmpget -v2c -c $COMMUNITY $HOST transmission.94.1.1.2.1.5.4 | 
awk '{print $NF}'`
RemoteLineAttn_db=`perl -le "printf( '%.1f', $RemoteLineAttn / 10 )"`

LocalSNRMargin=`snmpget -v2c -c $COMMUNITY $HOST transmission.94.1.1.3.1.4.4 | 
awk '{print $NF}'`
LocalSNRMargin_db=`perl -le "printf( '%.1f', $LocalSNRMargin / 10 )"`
RemoteSNRMargin=`snmpget -v2c -c $COMMUNITY $HOST transmission.94.1.1.2.1.4.4 
| awk '{print $NF}'`
RemoteSNRMargin_db=`perl -le "printf( '%.1f', ( $RemoteSNRMargin / 2 ) / 
10 )"`

LocalTxPower=`snmpget -v2c -c $COMMUNITY $HOST transmission.94.1.1.3.1.7.4 | 
awk '{print $NF}'`
LocalTxPower_db=`perl -le "printf( '%.1f', ( $LocalTxPower / 2 ) / 10 )"`

echo
echo " $sysDescr"
echo
echo " System Uptime:                   $sysUpTime"
echo
echo " Max. Download speed:             $RxBitRate_kbytes kbytes/sec"
echo " Max. Upload speed:               $TxBitRate_kbytes kbytes/sec"
echo
echo " Current Download speed:  $RxBitRate_current_kbytes kbytes/sec"
echo " Current Upload speed:            $TxBitRate_current_kbytes kbytes/sec"
echo
echo " Line Attenuation Local/Remote:   $LocalLineAttn_db/$RemoteLineAttn_db 
db"
echo " SNR Margin Local/Remote: $LocalSNRMargin_db/$RemoteSNRMargin_db db"
echo " Local Tx Power:          $LocalTxPower_db db"
echo

---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---


Rick


More information about the linuxsa mailing list