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
[email protected]
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf 
Of Dave Shield
Sent: Wednesday, March 31, 2010 3:19 AM
To: Jatin; Jatin Davey; PEOPLES, MICHAEL P (ATTSI)
Cc: [email protected]
Subject: Re: Thread Usage of a specific process

On 30 March 2010 18:24, PEOPLES, MICHAEL P (ATTSI) <[email protected]> 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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to