Dave Shield | 1 Apr 2010 09:18
Picon
Favicon

Re: monitor -S option doesn't work

On 31 March 2010 23:03, X Z <bohr <at> live.com> wrote:
> Looks like I have multiple instances of snmpd.conf file.
> Please see my previous email for output with -Dread_config option.

No - that output looks correct.
The agent only finds two config files:
   /var/net-snmp/snmpd.conf    (for persistent information)
   /etc/snmp/snmpd.conf    (explicitly specified using -c)

It processes each of these twice - once for pre-MIB directives,
and once for everything else.    That's completely normal.

Whatever is causing the problems you're seeing, it's not
multiple instances of config files.

Dave

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

(Continue reading)

Dave Shield | 1 Apr 2010 09:26
Picon
Favicon

Re: Seg fault when querying for the UDP table

On 31 March 2010 23:30, Malathi Panyam <malathipanyam <at> yahoo.com> wrote:
>             I tried using the debug flags you provided

No - you turned on *ALL* debugging.
So any useful information promptly gets buried in a mass of output.

There's also not a lot of point in turning on the udpEndpointTable
debug output if you also disable this module altogether.

I suggested that you turned on debugging, *OR* disabled the
module - two mutually exclusive alternatives.

Please try the original suggestion first - enable the selected
debugging tokens *only*, and leave all modules active.

> I would like to mention I do override the ifTable and ifXTable functionality
> in my subagent code..and we use Net SNMP 5.4.2.1.

What happens if you don't run your subagent?
Try *just* starting the standard Net-SNMP agent, and
run a GetNext on the udpEndpointTable.

Does the agent crash?
What does the debug output look like?

Dave

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
(Continue reading)

sanjaykumar | 1 Apr 2010 11:36
Favicon

set command in IPv6

Hi All,
          I am  trying to give the set command in IPv6 like
snmpset -v 2c -c private udp6:[2001:db8:100:f101:2e0:4cff:fe36:12a9]:161  .1.3.6.1.2.1.140.1.2.9.0  s tftp://[172.16.8.128]/coexist_test.bin

but I am getting the the following ERROR

snmpset: Unknown host (udp6:[2001:db8:100:f101:2e0:4cff:fe36:12a9]:161) (No such file or directory)

Could anybody help me out ???

Rgds,
Sanjay

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
PEOPLES, MICHAEL P (ATTSI | 1 Apr 2010 14:52
Picon
Favicon

RE: Thread Usage of a specific process - Use of the "extend" directive

Dave is quite correct in his statement.  I should note that "standard" Solaris 10 installations utilize the
5.0.9 version of the agent, which does not appear to support the "extend" directive.

Where might I find good documentation on the use of the "extend" directive?  I have looked at the Net-SNMP web
site, and it is rather sparse on the subject.  You mentioned in an earlier e-mail that it might solve a
problem I'm having, but I can't see, from the documentation, that it behaves much differently from "exec".

Thank you.

Michael Peoples
Senior Systems Manager
AT&T - ATTSI
Office:   614-789-8559
Cell:      614-886-0923
FAX:     614-789-8975
mpeoples <at> att.com
-----Original Message-----
From: dave.shield <at> googlemail.com [mailto:dave.shield <at> googlemail.com] On Behalf Of Dave Shield
Sent: Wednesday, March 31, 2010 3:19 AM
To: Jatin; Jatin Davey; PEOPLES, MICHAEL P (ATTSI)
Cc: net-snmp-users <at> lists.sourceforge.net
Subject: Re: Thread Usage of a specific process

On 30 March 2010 18:24, PEOPLES, MICHAEL P (ATTSI) <mp4783 <at> att.com> wrote:
> - Insert the following line into your snmpd.conf file (the script
> reference is just an example):
>
>        exec .1.3.6.1.4.1.2021.250.1.1 threadCount
> /usr/local/bin/threadCount.ksh

One comment about this.
Depending on the version of the agent that you are using,
the directive
    "exec  {OID} ..... "
             may not work.
(Even if it does, the output that it produces is not strictly legal!)

For the last five years, we have been deprecating this directive
in favour of "extend".   The basic functionality is the same,
but it's much more configurable, the output is more flexible
and has the minor advantage of being valid SNMP!

> - From your monitoring system, or any other system that can make an
> snmpget poll to the system, issue the following command:
>
>        snmpget -c public -v 2c myhost.me.com
>                  .1.3.6.1.4.1.2021.250.1.1.101.1

Probably the main disadvantage of the newer form is the output
OIDs are slightly less immediately predictable.   The new tables
use the name token ("threadCount") to index the output (and
configuration) tables,  rather than relying on the ordering of
entries within the config file.

The simplest way to start is probably to omit the {OID} altogether,
and use

   extend threadCount /usr/local/bin/threadCount.ksh

Then issue a walk on "NET-SNMP-EXTEND-MIB::nsExtendOutput1Table"
This will report the output in a meaningful fashion.  (There's also
"nsExtendOutput2Table", which reports the output one line at a time).

And see also "nsExtendConfigTable", which allows control of the
command to be run (including command-line parameters, input
text, etc).

Alternatively you could take a copy of that MIB file, change the
name of the module, and update the root OID to match the
"extend {OID}" value.
   Then the output of walking that root would be interpreted
correctly - the structure is the same as the bare "extend" directive
(another change from the "exec" form).

Dave

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

PEOPLES, MICHAEL P (ATTSI | 1 Apr 2010 15:00
Picon
Favicon

RE: How to write a code to send a trap when we remove power cable?

Harendra,

 

Check for SNMP agents supplied with the OS or by the hardware manufacturer.  Most will detect hardware faults and send traps.  Dell, HP, and IBM all supply a sub-agent that will alarm on virtually any hardware fault.

 

If that is not available, consider using the agent “Arbitrary Extension Commands” function.  I have never used them for traps, so it may not be appropriate.

 

If you can detect the hardware fault with a script (you could have it poll every couple of seconds), then you can have that script execute an snmptrap command with a “fake” OID that your management system will recognize.  This method means you don’t have to write a subagent.

 

An expert like Dave Shield could probably comment on the viability of this option.

 

Good luck.

 

Michael Peoples

Senior Systems Manager

AT&T - ATTSI

Office: 614-789-8559

Cell:    614-886-0923

FAX:   614-789-8975

mpeoples <at> att.com

From: Harendra Pratap Singh [mailto:harendra.singh <at> globallogic.com]
Sent: Wednesday, March 31, 2010 8:36 AM
To: net-snmp-users <at> lists.sourceforge.net
Subject: How to write a code to send a trap when we remove power cable?

 

Hi All,

 

I am using suse linux and I snmpd as master agent. I want to write a sub-agent which sends trap upon removing one power cable(there are two slots available both can be connected at the same time). Thanks in advance.

 

 

Thanks,

Harendra

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Dave Shield | 1 Apr 2010 15:20
Picon
Favicon

Re: Thread Usage of a specific process - Use of the "extend" directive

On 1 April 2010 13:52, PEOPLES, MICHAEL P (ATTSI) <mp4783 <at> att.com> wrote:
> I should note that "standard" Solaris 10 installations utilize the 5.0.9 version
> of the agent, which does not appear to support the "extend" directive.

Correct.
The first code for extend directive was written in mid 2004,
while 5.0.9 was released in September 2003.   This version
is not exactly cutting edge!

> Where might I find good documentation on the use of
> the "extend" directive?

It's covered in the snmpd.conf(5) man page (at least in current releases)
Also have a look at the NET-SNMP-EXTEND-MIB, which describes the
structure of the output.

> I can't see, from the documentation, that it behaves much differently from "exec".

The basic functionality is essentially the same.
There are two main areas of difference.

  a) There is a fuller (consistent and legal) structure for retrieving
       output from the command.  This is described in the MIB above,
       and is the same for both "extend {name} {command}" and
       "extend {OID} {name} {command}" directives.

       (With "exec", the structure of the output is different, depending
       on whether there's an OID specified or not!)

  b)  "extend"-style directives can be configured via SET requests
        (see the nsExtendConfigTable), including command-line
        options and standard input,  "exec" commands can only
        be set up via the snmpd.conf file.

Dave

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Prakadeesh S P | 1 Apr 2010 17:09
Picon
Favicon

Version problem for perl install

Hi All,

          this is my first post so apologies for an posting rules broken.

I am trying to use net-snmp with my activestate perl on ubuntu. I have successfully done the ./configure option but when i get to the perl makefile.pl
I get the version mismatch error. I am new to perl and not a gud unix expert too. so kndly help me with the following error. what should I do now to solve the version problem.


Error as below:
root <at> desktop:~/Downloads/net-snmp-5.5/perl# perl Makefile.PL
Unrecognized argument in LIBS ignored: '-Wl,-Bsymbolic-functions'
Writing Makefile for NetSNMP::default_store
Unrecognized argument in LIBS ignored: '-Wl,-Bsymbolic-functions'
Writing Makefile for NetSNMP::ASN
ERROR:
Net-SNMP installed version: 5.4.1 => 5.0401
Perl Module Version:        5.05

These versions must match for perfect support of the module.  It is possible
that different versions may work together, but it is strongly recommended
that you make these two versions identical.  You can get the Net-SNMP
source code and the associated perl modules directly from

   http://www.net-snmp.org/

If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION
environmental variable to 1 and re-run the Makefile.PL script.


Thanks,
Deesh




------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Malathi Panyam | 1 Apr 2010 18:19
Picon
Favicon

Re: Seg fault when querying for the UDP table

Hi Dave,
            If I dont use -DALL, I do not see any debug out other than the seg fault message.

This time I tried running only the standard agent and including all the modules.. Everything works fine. udpTable shows up without any issues..

The moment I exclude the "ifTable" it starts giving the segfault. So it looks like when I exclude the "ifTable" from the agent I should take care of something more??
Do we need to handle any other MIB code when ifTable is implemented by subagent? What are the other dependencies?

Thanks for all your effort s.

Regards,
Malathi

From: Dave Shield <D.T.Shield <at> liverpool.ac.uk>
To: Malathi Panyam <malathipanyam <at> yahoo.com>
Cc: net-snmp-users <at> lists.sourceforge.net
Sent: Thu, April 1, 2010 12:26:26 AM
Subject: Re: Seg fault when querying for the UDP table

On 31 March 2010 23:30, Malathi Panyam <malathipanyam <at> yahoo.com> wrote:
>             I tried using the debug flags you provided

No - you turned on *ALL* debugging.
So any useful information promptly gets buried in a mass of output.

There's also not a lot of point in turning on the udpEndpointTable
debug output if you also disable this module altogether.

I suggested that you turned on debugging, *OR* disabled the
module - two mutually exclusive alternatives.

Please try the original suggestion first - enable the selected
debugging tokens *only*, and leave all modules active.



> I woul d like to mention I do override the ifTable and ifXTable functionality
> in my subagent code..and we use Net SNMP 5.4.2.1.

What happens if you don't run your subagent?
Try *just* starting the standard Net-SNMP agent, and
run a GetNext on the udpEndpointTable.

Does the agent crash?
What does the debug output look like?

Dave

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Dave Shield | 1 Apr 2010 18:56
Picon
Favicon

Re: Version problem for perl install

On 1 April 2010 16:09, Prakadeesh S P <deeshsiva <at> yahoo.com> wrote:
> I am trying to use net-snmp with my activestate perl on ubuntu.
> I have successfully done the ./configure option but when i get to the perl makefile.pl
> I get the version mismatch error.

> ERROR:
> Net-SNMP installed version: 5.4.1 => 5.0401
> Perl Module Version:        5.05
>
> These versions must match for perfect support of the module.

It looks as if your system already has Net-SNMP installed.
Probably as part of the operating system.

Because the perl module works very closely with the C-based
libraries, it's important that the version of this library matches
the version of the perl module that you're trying to install.

The simplest way forward is probably to use the SNMP perl
module that Ubuntu provides, since this will be compatible
with the packages you already have.   The name of this
package is "libsnmp-perl", and you'd install it in the same
way as any other Ubuntu package.

Otherwise, you'll need to remove all trace of the Ubuntu-version
of Net-SNMP, and compile/install the whole thing from source.
But don't try and mix-and-match the two - it'll cause all kinds
of headaches.

Dave

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Dave Shield | 1 Apr 2010 19:05
Picon
Favicon

Re: How to write a code to send a trap when we remove power cable?

On 1 April 2010 14:00, PEOPLES, MICHAEL P (ATTSI) <mp4783 <at> att.com> wrote:
> If that is not available, consider using the agent “Arbitrary Extension Commands”
> function.  I have never used them for traps, so it may not be appropriate.

Not really, no.
These mechanisms are designed to respond to GET* (or SET) requests - i.e.
they are triggered by an incoming SNMP packet.

The thing about notifications is that they are *not* related to an incoming
SNMP request.   Traps are typically triggered by some external event,
and detecting this is often the hardest part of the problem.

Hence the advice I gave Harendra yesterday.

> If you can detect the hardware fault with a script

I.e. if you can do the hardest bit!

> (you could have it poll every couple of seconds),
> then you can have that script execute an snmptrap command

Exactly.

> with a “fake” OID that your management system will recognize.

Please don't think in terms of "fake" OIDs.
What you are talking about is an enterprise-specific notification OID.
There's nothing "fake" about this.

If you have an enterprise number of your own, then you can define
MIBs within this tree, including trap objects.   Otherwise, you are
more than welcome to use the nsPlayPen subtree to define suitable
MIB objects.   (As long as this is going to be a private definition,
and will never be released publically!)

Dave

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Gmane