Re: A little bit of a trouble here
Raul Miguel Nery Ferreira Sa <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Oh and i forgot to say that i have net-snmp-perl package installed.
Cheers
Raul de Sá
On Mon, 5 Nov 2007, Raul Miguel Nery Ferreira Sa wrote:
> Hello,
>
> Replying to your answer, David, i am listing the environment variables in my
> code using this snipet:
>
> foreach $key (keys(%ENV)) {
> printf("%-10.10s: $ENV{$key}\n", $key);
> }
>
> The thing is in my environment variables there is no 'MIB' env var and no
> 'MIBDIR' env var. I need these environment vars because i am doing a script
> which has to load MIBs that are not loaded by default. In fact i don't know
> why but my script isn't loading the default MIbs either.
> I send next a snipet of my code. offcours ei ommit the community string
> and the host variables:
>
> #!/usr/bin/perl
>
> use SNMP; #|| die("Cannot load module\n");
>
> #$ENV['MIBDIRS']="/usr/local/share/snmp/mibs";
>
> #foreach $key (keys(%ENV)) {
> # printf("%-10.10s: $ENV{$key}\n", $key);
> #}
>
> $HOST = "";
> $COMM_STRING = "";
>
> $SESSION = new SNMP::Session (DestHost => $HOST,
> Community => $COMM_STRING,
> Version => 2);
>
> $ITENS_PESQ = new
> SNMP::VarList(['entPhysicalSerialNum.1'],['sysName.0'],['sysLocation.0'],['ifPhysAddress.1'],['ifPhysAddress.2'],['entPhysicalDescr'],
> ['sysDescr']);
>
> $RES_PESQ = $SESSION->getnext($ITENS_PESQ);
>
>
> Cheers
> Raul de Sá
>
> On Mon, 5 Nov 2007, Dave Shield wrote:
>
>> On 05/11/2007, Raul Miguel Nery Ferreira Sa <[email protected]>
>> wrote:
>>> .... I installed net-snmp using Unix's comand
>>> "yum", more precisely "yum install net-snmp..." and i cannot find the
>>> snmp.conf file!!!!
>>
>> There probably isn't a file 'snmp.conf' as part of this package.
>> It's not needed for basic operation, and most sites run quite
>> happily without it.
>> That's not the case with the 'snmpd.conf' file, which *is*
>> required for the agent to run sensibly. (If only for configuring
>> access control).
>>
>>> I really need this file to check some variables.
>>
>> Have a look at the man page 'snmp.conf', which should describe
>> most of the common directives used in this file.
>>
>>
>>
>>> The other problem that is happening to me is that because of this
>>> snmp.conf problem some environment variables like MIBs or MIBDIRS
>>> don't seem to work when i try to import them to my perl scripts. I tried
>>> listing the environment variables and MIBs or MIBFILES don't show either.
>>> The directory where the MIBs are is /usr/share/snmp/mibs and the version
>>> of net-snmp that i am using is net-snmp-5.4.
>>
>> How are you setting these environment variables?
>>
>> Dave
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems? Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Net-snmp-users mailing list
>> [email protected]
>> Please see the following page to unsubscribe or change other options:
>> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users