On 23/11/06, Enzo Arlati <[EMAIL PROTECTED]> wrote:
> I see there a lot of extra data , also for indexing a variable ,
>  so I wondering what the name are used for,

With the old "exec" mechanism, the name was basically ignored,
and the output of the script was rooted directly below the specified
OID (in a format that was not strictly legal).  This meant that you
could only specify one "exec" entry for any given OID.

The new "extend" mechanism uses the name token as the index
to the various tables.  So you can now specify several different
"extend" tokens, using the same root OID - just as long as the
names are distinct.

   Try it without the OID to start with
(i.e.   "extend   diskusage   /bin/df -a") and then walk
NET-SNMP-EXTEND-MIB::nsExtendObjects
The structure of the output is exactly the same, whether it's
rooted at the "standard" location, or a user-specified OID.
[That's another difference between "exec" and "extend" - the older
directive has two different MIB structures, depending on whether
there was a root OID specified or not.]




> There should be something wrong in the following configuration file
>
> extend .1.3.6.1.4.1.17377.35.12   A     /bin/cat /proc/cpuinfo
> extend .1.3.6.1.4.1.17377.35.13   A     /bin/df -a
> extend .1.3.6.1.4.1.17377.35.14   A     /sbin/lspci

No - that should be fine.
As would

> extend .1.3.6.1.4.1.17377.35.12   A     /bin/cat /proc/cpuinfo
> extend .1.3.6.1.4.1.17377.35.12   B     /bin/df -a
> extend .1.3.6.1.4.1.17377.35.12   C     /sbin/lspci

But you couldn't have

> extend .1.3.6.1.4.1.17377.35.12   A     /bin/cat /proc/cpuinfo
> extend .1.3.6.1.4.1.17377.35.12   A     /bin/df -a
> extend .1.3.6.1.4.1.17377.35.12   A     /sbin/lspci

(though I'd need to do some testing to check whether the code
detects this, and complains).


Note that the output structure of
     "extend  OID ....."
is *not* the same as
    "exec OID ...."
(not least, since this latter is not a valid MIB structure!).


Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to