On Tuesday 30 July 2002 04:25 pm, Oliver Francke wrote:
Hi,
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?
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.
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