Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > CISCO OIDs help

Reply
Thread Tools

CISCO OIDs help

 
 
tarantatu@gmail.com
Guest
Posts: n/a
 
      10-13-2005
Hy all, i'm trying to get some informations about my routers.
i found this simple script on the cisco cookbook:

public="my-com"
workingdir="myhome"
#
LOG=$workingdir/RESULT-inventory.csv
infile=$workingdir/RTR_LIST-inventory
snmp="/usr/bin/snmpget -v1 -c $public"
#
while read device
do
$snmp $device sysName.0 > /dev/null
if [ "$?" = "0" ] ; then
rtr=`$snmp $device .1.3.6.1.4.1.9.2.1.3.0 | cut -f2 -d\" `
type2=`$snmp $device .1.3.6.1.4.1.9.9.25.1.1.1.2.3 | cut -f2 -d$ `
ios=`$snmp $device .1.3.6.1.4.1.9.9.25.1.1.1.2.5 | cut -f2 -d$ `
prot=`$snmp $device .1.3.6.1.4.1.9.9.25.1.1.1.2.4 | cut -f2 -d$ `
echo "$device, $rtr, $type2, $ios, $prot" >> $LOG
fi
done < $infile

i need to add other OIDs to get info about interfaces type and the
amount of the memory installed on the devices but i'm not able to
undrstand how to find'em.

can you help me to understand how?

thanks in advance

Jug

 
Reply With Quote
 
 
 
 
axel@white-eagle.invalid.uk
Guest
Posts: n/a
 
      10-13-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hy all, i'm trying to get some informations about my routers.
> i found this simple script on the cisco cookbook:


> public="my-com"
> workingdir="myhome"
> #
> LOG=$workingdir/RESULT-inventory.csv
> infile=$workingdir/RTR_LIST-inventory
> snmp="/usr/bin/snmpget -v1 -c $public"
> #
> while read device
> do
> $snmp $device sysName.0 > /dev/null
> if [ "$?" = "0" ] ; then
> rtr=`$snmp $device .1.3.6.1.4.1.9.2.1.3.0 | cut -f2 -d\" `
> type2=`$snmp $device .1.3.6.1.4.1.9.9.25.1.1.1.2.3 | cut -f2 -d$ `
> ios=`$snmp $device .1.3.6.1.4.1.9.9.25.1.1.1.2.5 | cut -f2 -d$ `
> prot=`$snmp $device .1.3.6.1.4.1.9.9.25.1.1.1.2.4 | cut -f2 -d$ `
> echo "$device, $rtr, $type2, $ios, $prot" >> $LOG
> fi
> done < $infile


> i need to add other OIDs to get info about interfaces type and the
> amount of the memory installed on the devices but i'm not able to
> undrstand how to find'em.


> can you help me to understand how?


No, this is not a Perl script.

Axel

 
Reply With Quote
 
 
 
 
Anno Siegel
Guest
Posts: n/a
 
      10-13-2005
<(E-Mail Removed)> wrote in comp.lang.perl.misc:
> Hy all, i'm trying to get some informations about my routers.
> i found this simple script on the cisco cookbook:


[shell script snipped]

> i need to add other OIDs to get info about interfaces type and the
> amount of the memory installed on the devices but i'm not able to
> undrstand how to find'em.


Why are you asking this on a Perl newsgroup?

Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
 
Reply With Quote
 
Josef Moellers
Guest
Posts: n/a
 
      10-13-2005
(E-Mail Removed) wrote:
> Hy all, i'm trying to get some informations about my routers.
> i found this simple script on the cisco cookbook:
>
> public="my-com"
> workingdir="myhome"
> #
> LOG=$workingdir/RESULT-inventory.csv
> infile=$workingdir/RTR_LIST-inventory
> snmp="/usr/bin/snmpget -v1 -c $public"
> #
> while read device
> do
> $snmp $device sysName.0 > /dev/null
> if [ "$?" = "0" ] ; then
> rtr=`$snmp $device .1.3.6.1.4.1.9.2.1.3.0 | cut -f2 -d\" `
> type2=`$snmp $device .1.3.6.1.4.1.9.9.25.1.1.1.2.3 | cut -f2 -d$ `
> ios=`$snmp $device .1.3.6.1.4.1.9.9.25.1.1.1.2.5 | cut -f2 -d$ `
> prot=`$snmp $device .1.3.6.1.4.1.9.9.25.1.1.1.2.4 | cut -f2 -d$ `
> echo "$device, $rtr, $type2, $ios, $prot" >> $LOG
> fi
> done < $infile
>
> i need to add other OIDs to get info about interfaces type and the
> amount of the memory installed on the devices but i'm not able to
> undrstand how to find'em.


And your Perl question is?

The above is shell, not Perl.
And this newsgroup does not have SNMP in its name.
--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett

 
Reply With Quote
 
tarantatu@gmail.com
Guest
Posts: n/a
 
      10-13-2005
Sorry, i forgot the most important question, is there a perl script to
do it?
can you helpme finding resources (links or suggests)?

thanks

 
Reply With Quote
 
SSS
Guest
Posts: n/a
 
      10-13-2005
(E-Mail Removed) wrote:
> Sorry, i forgot the most important question, is there a perl script to
> do it?
> can you helpme finding resources (links or suggests)?
>
> thanks
>


Check out the SNMP module on CPAN
 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      10-13-2005
(E-Mail Removed) wrote in news:1129199612.388927.308400
@g14g2000cwa.googlegroups.com:

> Sorry, i forgot the most important question, is there a perl script to
> do it?


Do what?

> can you helpme finding resources (links or suggests)?


Please read the posting guidelines.

Sinan

--
A. Sinan Unur <(E-Mail Removed)>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html
 
Reply With Quote
 
Josef Moellers
Guest
Posts: n/a
 
      10-13-2005
(E-Mail Removed) wrote:
> Sorry, i forgot the most important question, is there a perl script to
> do it?
> can you helpme finding resources (links or suggests)?
>
> thanks


Have you not found the Net::SNMP package while looking for a solution?

--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Translating pysnmp oids to human readable strings SpamMePlease PleasePlease Python 15 03-09-2009 05:03 AM
WLAN Driver Port to NDIS 6.0 & OIDs QuasiCodo Wireless Networking 0 04-05-2007 03:37 PM
SNMP OIDs required for Cisco 1200 and Cisco 1100 series APs NYA Cisco 1 11-07-2006 11:05 PM
OIDs and MIBs Ayanda Madyibi Cisco 1 07-21-2004 06:29 PM
Strange OIDs returned for IBM 3584 v2c trap variables John Ramsden Perl Misc 2 09-04-2003 03:33 PM



Advertisments