Subject: [USR-TC] modem stats via snmp

From: Lewis Bergman <[email-masked]>
Date: Tue, 30 Jul 2002 20:14:52 +0000

Is anyone using the various mdmCs<whatever> mib or OID's to gather info on 
their modem's performance. It seems that quite a few in there might be of 
use. The curious ones go from 1.3.6.1.4.1.429.1.6.9.1.1.8.<slot# * 1000 + 
span#> to about 1.3.6.1.4.1.429.1.6.9.1.1.61.<slot# * 1000 + span#>

Does anyone know how the TC maps port numbers which the NMC uses above - 
<slot# * 1000 + span#> to the one the arc uses to report back a username in 
OID 1.3.6.1.4.1.429.4.10.1.1.18? Or is there another OID that might report 
back a username that uses the same type of numbering scheme?
-- 
Lewis Bergman
Texas Communications
4309 Maple St.
Abilene, TX 79602-8044
915-695-6962 ext 115

---

From: Oliver Francke <[email-masked]>
Date: Tue, 30 Jul 2002 21:25:40 +0000

Hi,

> back a username that uses the same type of numbering scheme?

So the mapping is:

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

#!/bin/sh

RCOMM=<your-read-community>

SRV=$1
SLT=$2
MDM=$3

DUM=`expr $SLT \* 256`

INST=`expr 1000 + $DUM + $MDM`

echo $INST

# usrCipUserName 1.3.6.1.4.1.429.4.10.1.1.18
# usrCipDataLinkConn 1.3.6.1.4.1.429.4.10.1.1.20

snmpget $SRV $RCOMM .1.3.6.1.4.1.429.4.10.1.1.18.$INST .1.3.6.1.4.1.429.4.10.1.1.20.$INST

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

So, a possible output may be:

--- 8-< --------------
GetPortInfo.sh srv1.somewhere 1 2
1258
enterprises.429.4.10.1.1.18.1258 = "aolnet/aol.dlp.Elchenc8.10120100100101de2905.0000.prod"
enterprises.429.4.10.1.1.20.1258 = 10
--- 8-< --------------

corresponds to:

--- 8-< --------------
srv1.somewhere> list conNECTIONS 

CONNECTIONS

                                                        Start       Start
IfName          User Name                   Type   DLL  Date        Time
slot:1/mod:2    aolnet/aol.dlp.Elchenc8.10120100100101de2905.0000.prod 
                                            DIALIN L2TP 30-JUL-2002 20:32:11  
--- 8-< --------------

Hope this helps, Oliver.

-- 
Was hat bei uns die geringste PopulariTAET?

[email-masked]               fon. +49-5246-80-1389
                                           mob.  +49-171-5597734
I used to have a sig, but I've stopped smoking now.

---

From: Lewis Bergman <[email-masked]>
Date: Tue, 30 Jul 2002 22:12:38 +0000

On Tuesday 30 July 2002 04:25 pm, Oliver Francke wrote:
> > <slot# * 1000 + span#> to the one the arc uses to report back a username
> > in OID 1.3.6.1.4.1.429.4.10.1.1.18? Or is there another OID that might
> > report back a username that uses the same type of numbering scheme?
>
> So the mapping is:
>
> --- 8-< --------------
>
> #!/bin/sh
>
> enterprises.429.4.10.1.1.18.1258 =
> "aolnet/aol.dlp.Elchenc8.10120100100101de2905.0000.prod"
>                                             DIALIN L2TP 30-JUL-2002
> 20:32:11 --- 8-< --------------
>
> Hope this helps, Oliver.

Well, I am not sure. The output below shows the result of some commands I ran. 
The usrCipDataLinkConn returns the same value for many different users.

monitor:/var/www/mrtg# snmpget <harcip> <comm> \ 
.1.3.6.1.4.1.429.4.10.1.1.18.3067
enterprises.429.4.10.1.1.18.3067 = "bettyj"
monitor:/var/www/mrtg# snmpget <harcip> <comm> \ 
.1.3.6.1.4.1.429.4.10.1.1.20.3067
enterprises.429.4.10.1.1.20.3067 = 4
monitor:/var/www/mrtg# snmpget <harcip> <comm> \ 
.1.3.6.1.4.1.429.4.10.1.1.20.2292
enterprises.429.4.10.1.1.20.2292 = 4

I am looking for a relationship between some OID's and the username. From the 
digging into the MIB's I have done it appears that only the NMC can report 
modem stats and it uses the slot/span number method. The HiperARC has the 
username but not the modem stats. So I am looking for an algorythem, OID 
pair, whatever, that I can some how relate the two. Maybe what you gave me 
does that and I just can't see it.

My end goal is to use the Python or PHP SNMP extensions to do a walk on 
.1.3.6.1.4.1.429.4.10.1.1.18.3067 which will populate an array or list with 
usernames. Then i can do a little math magic, convert the port numbers to 
slot/span numbers, and pull out the modem stats and display them. Maybe the 
IP is a way of bridging this gap?

I am probably just lost as usual.
-- 
Lewis Bergman
Texas Communications
4309 Maple St.
Abilene, TX 79602-8044
915-695-6962 ext 115

---

From: Oliver Francke <[email-masked]>
Date: Wed, 31 Jul 2002 07:28:40 +0000

Lewis,

> monitor:/var/www/mrtg# snmpget <harcip> <comm> \ 

Well then: there is some table:

usrCipPortIfName 1.3.6.1.4.1.429.4.10.1.1.25

which gives s/t like:

enterprises.429.4.10.1.1.25.1513 = "slot:2/mod:1"
enterprises.429.4.10.1.1.25.1514 = "slot:2/mod:2"
enterprises.429.4.10.1.1.25.1515 = "slot:2/mod:3"
enterprises.429.4.10.1.1.25.1516 = "slot:2/mod:4"
.
.
.

This could be a method to get to the modem...

If the following is valid:

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

srv1.somewhere> show chasSIS modeM_NAMING 

CHASSIS MODEM NAMING
Modem Namings:                             CONTIGUOUS
srv39.gtso> sh pbuS setTINGS 

PBUS SETTINGS
Reported Base:           1
Port Density:            256
Span Density:            31
Span Density Style:      GLOBAL
No of Spans/Slot format:
Slot No     : 1   2   3   4   5   6   7   8   9   10  11  12  13  14  15 16  
No Of Spans : 1   1   1   1   1   1   1   1   1   1   1   1   1   1   1  1   

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

then the algorythm is:

NMC-modem => HARC-interface:

1000 + <slot> * 256 + <modem>

and of course:

$SLOT = int( ($INTERFACE - 1000) / 256);
$MOD  = $INTERFACE - 1000 - ( $SLOT * 256);

so see if it matches. Should be slot:8/mod:19.

> digging into the MIB's I have done it appears that only the NMC can report 

Perhaps you just do a walk through:

snmpwalk srv1.somewhere <rcomm> .1.3.6.1.4.1.429.4.10 

and get your lines of interest... cause there are a couple of items that
reflect the corresponding MDM.MIB-values...

Regards, Oliver.