Sponsored Content
Full Discussion: SNMP Problem
Special Forums IP Networking SNMP Problem Post 302529692 by cabaiste on Friday 10th of June 2011 04:37:38 AM
Old 06-10-2011
SNMP Problem

Hi, basically I'm just looking at the O'Reilly book 'Essential SNMP' and am following one of the examples. The code in the example is:

Code:
#!/usr/bin/perl
use SNMP::Util;
my $MIB1 = $ARGV[0];
my $HOST = $ARGV[1];
($MIB1) && ($HOST) || die "Usage: $0 MIB_OID HOSTNAME";
my $value = &snmpget("$HOST","$MIB1");
if ($value) { print "Results :$MIB1: :$value:\n"; }
else { warn "No response from host :$HOST:\n"; }

And the errors I'm getting are:

Code:
"my" variable $value masks earlier declaration in same statement at /usr/perl5/5.8.4/lib/SNMP/Util.pm line 804.
"my" variable @oid_names masks earlier declaration in same statement at /usr/perl5/5.8.4/lib/SNMP/Util.pm line 1636.
Undefined subroutine &main::snmpget called at ./snmpTest line 8.

Any ideas?
 

10 More Discussions You Might Find Interesting

1. Infrastructure Monitoring

Facing problem while configuring snmp

HI, I am facing these two errors while configuring snmp can any body guide me. vi /var/log/snmpd.log Error opening specified endpoint "udp:161" Server Exiting with code 1 i also tried bash-3.00# netstat -a | grep snm *.snmpd Idle bash-3.00# lsof -i :161 bash: lsof: command not... (2 Replies)
Discussion started by: nir1785
2 Replies

2. Infrastructure Monitoring

SNMP problem

Hi all I had the server, when i run the below snmp command in the server (CNORA4/10.86.33.18), it cant give me the result. # snmpwalk -v1 -ctestuser 10.86.33.18 hrProcessorLoad Timeout: No Response from 10.86.33.18 but when i run another command, it seem like ok # snmpwalk -v1 -ctestuser... (1 Reply)
Discussion started by: SmartAntz
1 Replies

3. UNIX for Dummies Questions & Answers

Snmp Disk Problem = Negative Values

Ok, so i monitor disk space on remote machines using snmp. Works great for me. But whenever a particular partition happens to have Terabytes of data, snmp starts reporting negative values. Can someone please tell me how to get around this problem? The AllocationUnit is 512 bytes. Weird... (0 Replies)
Discussion started by: SkySmart
0 Replies

4. IP Networking

Sending data from DELL OMSA SNMP and Custom SNMP MIB to same UDP port 161

Hi , Currently DELL OMSA SNMP sends data through default udp port 161.I want my custom SNMP MIB also to send data in the same udp port 161.Whether its possible.If yes where to configure .I tried starting my custom MIB in udp port 161,but it throws port already in use.Kindly guide. (0 Replies)
Discussion started by: prabakar4all
0 Replies

5. Red Hat

Sending data from DELL OMSA SNMP and Custom SNMP MIB to same UDP port 161

Hi , Currently DELL OMSA SNMP sends data through default udp port 161.I want my custom SNMP MIB also to send data in the same udp port 161.Whether its possible.If yes where to configure .I tried starting my custom MIB in udp port 161,but it throws port already in use.Kindly guide. (1 Reply)
Discussion started by: prabakar4all
1 Replies

6. IP Networking

SNMP Problem - SNMP not getting to the agent.

I am having a problem with an SNMP event, and I am not sure where I should be looking to solve this problem. Description: There is an SNMP event in our system that for one reason or another is not getting sent out as an email because it is never getting to our SNMP agent. I see where the... (0 Replies)
Discussion started by: broberts
0 Replies

7. Infrastructure Monitoring

SNMP traps to SNMP server

Dear Champs, I am new to unix, and need to configure linux server to send below traps to a SNMP server. Monitoring TRAP Disk Space Low Monitoring TRAP Memory Low Monitoring TRAP CPU high Monitoring TRAP Admin login/Logoff Please help me how to send this information to my SNMP server... (2 Replies)
Discussion started by: stavar
2 Replies

8. UNIX for Dummies Questions & Answers

Cacti SNMP Generic OID template, NaN problem

Hello All, I have installed cacti and I have Nan values on created graph. I really appreciate any help. I have done the following: 1. Linux Ubuntu 12.04.2 LTS 64 bits 2. apt-get install cacti // the cacti Version 0.8.7i was installed 3. Accessed "http://MyIP/cacti/index.php" 4. Set SNMP... (0 Replies)
Discussion started by: AndreiM
0 Replies

9. Shell Programming and Scripting

Perl snmp script problem

does anyone know why this isn't showing me any output? #!/usr/bin/perl use strict; use Net::SNMP; my $host = 'localhost'; my $community = 'public'; my $session; my $error; my $response = undef; ($session, $error) = Net::SNMP->session( -hostname => $host, -version => 2,... (0 Replies)
Discussion started by: SkySmart
0 Replies

10. UNIX for Dummies Questions & Answers

Need to transfer all kernel logs (var/log/messages) to the snmp listener as snmp trap

i am working with embedded system -Dell DCS management sub system. my question is as below: currently we are using linux kernel 2.6.30 build and we have a kernel logs stored to the /var/log/messages path. now we have to transfer all this logs to the specified SNMP target as a part of SNMP... (4 Replies)
Discussion started by: vipul_prajapati
4 Replies
Info::Layer2::N2270(3pm)				User Contributed Perl Documentation				  Info::Layer2::N2270(3pm)

NAME
SNMP::Info::Layer2::N2270 - SNMP Interface to Nortel 2270 Series Wireless Switch AUTHOR
Eric Miller SYNOPSIS
#Let SNMP::Info determine the correct subclass for you. my $n2270 = new SNMP::Info( AutoSpecify => 1, Debug => 1, DestHost => 'myswitch', Community => 'public', Version => 2 ) or die "Can't connect to DestHost. "; my $class = $n2270->class(); print " Using device sub class : $class "; DESCRIPTION
Provides abstraction to the configuration information obtainable from a Nortel 2270 Series Wireless Switch through SNMP. For speed or debugging purposes you can call the subclass directly, but not after determining a more specific class using the method above. my $n2270 = new SNMP::Info::Layer2::N2270(...); Inherited Classes SNMP::Info SNMP::Info::Bridge SNMP::Info::SONMP SNMP::Info::Airespace Required MIBs Inherited Classes' MIBs See "Required MIBs" in SNMP::Info for its own MIB requirements. See "Required MIBs" in SNMP::Info::Bridge for its own MIB requirements. See "Required MIBs" in SNMP::Info::SONMP for its own MIB requirements. See "Required MIBs" in SNMP::Info::Airespace for its own MIB requirements. GLOBALS
These are methods that return scalar value from SNMP $n2270->vendor() Returns 'nortel' $n2270->os() Returns 'nortel' $n2270->model() Cross references $bayhub->id() to the SYNOPTICS-ROOT-MIB and returns the results. Removes "sreg-WLANSecuritySwitch" from the model name Overrides $bayhub->index_factor() Required by SNMP::Info::SONMP. Number representing the number of ports reserved per slot within the device MIB. Returns 256. $bayhub->slot_offset() Required by SNMP::Info::SONMP. Offset if slot numbering does not start at 0. Returns 0. Globals imported from SNMP::Info See documentation in "GLOBALS" in SNMP::Info for details. Globals imported from SNMP::Info::Bridge See documentation in "GLOBALS" in SNMP::Info::Bridge for details. Global Methods imported from SNMP::Info::SONMP See documentation in "GLOBALS" in SNMP::Info::SONMP for details. Global Methods imported from SNMP::Info::Airespace See documentation in "GLOBALS" in SNMP::Info::Airespace for details. TABLE METHODS
These are methods that return tables of information in the form of a reference to a hash. Overrides None Table Methods imported from SNMP::Info See documentation in "TABLE METHODS" in SNMP::Info for details. Table Methods imported from SNMP::Info::Bridge See documentation in "TABLE METHODS" in SNMP::Info::Bridge for details. Table Methods imported from SNMP::Info::SONMP See documentation in "TABLE METHODS" in SNMP::Info::SONMP for details. Table Methods imported from SNMP::Info::Airespace See documentation in "TABLE METHODS" in SNMP::Info::Airespace for details. perl v5.12.4 2011-09-28 Info::Layer2::N2270(3pm)
All times are GMT -4. The time now is 03:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy