Well technically it is not a perl question, but in my Perl for system
administration pg 406 there was an example of retrieving how many
interfaces are on a device via perl code.

The actually code was :

 get_request("1.3.6.1.2.1.2.1.0");

and I wanted some help in understanding the 1.0 b/c 2 leaves me at
interfaces.   So is 1.0 the code to get the number of NIC cards?

so what is 1.0 ?  If I run this request will I see another hierarchy? Maybe
my map of the MIB is incomplete.

thanks for your help!

Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams




                                                                           
             "Tyson Sommer"                                                
             <[EMAIL PROTECTED]                                             
             .com>                                                      To 
                                       <[EMAIL PROTECTED]>, "'Perl    
             02/15/2005 05:42          Beginners '" <beginners@perl.org>   
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         RE: snmp requests CORRECTED!        
             <[EMAIL PROTECTED]                                             
                   .com>                                                   
                                                                           
                                                                           
                                                                           
                                                                           






> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 15, 2005 3:52 PM
> To: 'Perl Beginners '
> Subject: snmp requests CORRECTED!
>
>
> All,
>
> to get the number of interfaces via a snmp call from a perl
> program I would
> say:
>
> get_request("1.3.6.1.2.1.2.1.0");
>
> After referencing the MIB, I can follow the path to
> interfaces, but I get lost at 0 as there is no 0 on the MIB map.
> Is there another map?
>
> BEGIN
> - - - - - - - -
> iso 1
> org 3
> dod 6
> internet 1
> mgmt 2
> mib-2 1
> interfaces 2
>
> - - - - - - - -
> END
>
>
>
> Derek B. Smith
> OhioHealth IT
> UNIX / TSM / EDM Teams


What exactly are you trying to do? I'm still a novice Perl programmer, but
I've successfully done quite a bit of stuff with SNMP MIBs in Perl, so
maybe
I can help, but I don't quite understand what you're having a problem with.

Zero is just the placeholder for the data that you're getting out of that
MIB with SNMP. There are no other values in .1.3.6.1.2.1.2.1 other than
that
zero. There are many values, however, in the subsequent MIBs under
.1.3.6.1.2.1.2. Just do an snmpwalk on .1.3.6.1.2.1.2 (or even, more
specifically, .1.3.6.1.2.1.2.2.1) and you'll see you have a lot to work
with. That MIB can be appended with any number from 1 to whatever your
get_request() above returned to get specifics on any given interface.

This doesn't seem to really be a perl question though...

You list vets, please flame me if I'm breaking protocol here. I'm new to
the
list and less than a year in the Perl world (but I am fairly familiar with
this subject)...


Regards,
Tyson Sommer, CCNP
Network Support Specialist
First Cash Financial Services, Inc.
MIS Department
--





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to