Real Time Ascend Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(ASCEND) How hard can it be to get data from a Max 4060?
This is driving me nuts.
All I want to do is monitor the traffic over a 128K MPP or MP ISDN
circuit. I've read through MIBs until I can probably recite them line for
line, but can't see what's wrong. The Lucent and Ascend sites don't seem
to have anything that helps (well, not that I can /find/ anyway), one
helpful individual has sent me some code they used, which appears to work
for a /single/ caller, but I'm flummoxed.
Here's some really ugly code that is no more than a bunch of snmpwalks and
snmpgets and some sh script to glue it to gether (I want to get the
procedure right before I do anything more with it, and sh was convenient)
It's over-commented, and probably has more steps than I need, but I can't
see any other way of doing it... and it REALLY bugs me that it simply
doesn't work. It returns numbers that increment, but they don't seem to be
the right numbers - if I force traffic over that link, I don't see an
increase in the numbers.
Can anyone suggest where I'm going wrong, or better yet, offer a working
script that returns values for MPP connections over ISDN?
Thanks in advance...
#! /bin/sh
# called with host.domain.com community username
# eg ./max-bytes maxen.your.domain public permlink6
IN=0
OUT=0
# walk for all users, find just the one specified (multiple instances)
for CALL in `snmpwalk $1 $2 .1.3.6.1.4.1.529.12.2.1.3 \
| grep -w "$3" | sed "s/ =.*//; s/.*\.//"`; do
# Inner loop, run once for each current login by that user
# CALL has the index for this user for this call.
# Get the session number from the index.
SESSION=`snmpget $1 $2 .1.3.6.1.4.1.529.12.2.1.7.$CALL | sed 's/.*= //'`
# find the index for this session.
INDEX=`snmpwalk $1 $2 .1.3.6.1.4.1.529.11.2.1.4 | grep $SESSION \
| sed 's/ = .*//; s/.*\.//'`
# From that index, get the interface number
IFno=`snmpget $1 $2 .1.3.6.1.4.1.529.11.2.1.11.${INDEX} | sed 's/.*= //'`
# and now get input and output octets
I=`snmpget $1 $2 .1.3.6.1.2.1.2.2.1.10.$IFno | sed 's/.*= //'`
O=`snmpget $1 $2 .1.3.6.1.2.1.2.2.1.16.$IFno | sed 's/.*= //'`
# Add them to any previous bytes
IN=$(( $IN + $I ))
OUT=$(( $OUT + $O ))
done
# return the answers.
echo "Bytes in:$IN out:$OUT"
++ Ascend Users Mailing List ++
To unsubscribe: send unsubscribe to ascend-users-request@bungi.com
To get FAQ'd: <http://www.nealis.net/ascend/faq>