R: exec deprecated

"Enzo Arlati" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Thanks for the amswer.
I see there a lot of extra data , also for indexing a variable ,
 so I wondering what the name are used for, it should be compose the last part of the oid
but the oid is enough qualified with the index I give to it ( 12, 13 and 14 ).
If , for example , I used always tha same name 'A', as in the belowe example, 
I should however get different oid for each command.
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


give me output like this:

.1.3.6.1.4.1.17377.35.12.2.1.2.1.65 = STRING: "/bin/cat"
.1.3.6.1.4.1.17377.35.12.2.1.3.1.65 = STRING: "/proc/cpuinfo"
.......
.1.3.6.1.4.1.17377.35.13.2.1.2.1.65 = STRING: "/bin/df"
.1.3.6.1.4.1.17377.35.13.2.1.3.1.65 = STRING: "-a"
.........
.1.3.6.1.4.1.17377.35.14.2.1.2.1.65 = STRING: "/sbin/lspci"
.1.3.6.1.4.1.17377.35.14.2.1.3.1.65 = ""
.........

-----Messaggio originale-----
Da: [email protected] [mailto:[email protected]]Per
conto di Dave Shield
Inviato: giovedì 23 novembre 2006 9.56
A: Enzo Arlati
Cc: [email protected]
Oggetto: Re: exec deprecated


> I look for the extended directive that should replace the exec, but I didn't find it.

    $  man snmpd.conf

    EXTENDING AGENT FUNCTIONALITY
       Arbitrary Extension Commands

          [snip]

       extend [MIBOID] NAME PROG ARGS
              works in a similar manner to the exec directive, but with a num-
              ber  of  improvements.....


> Should someone give me a link about such topic and mybe an example on how use
> the new extended command.

You use it in exactly the same way as the previous "exec" command:

    extend .1.3.6.1.4.1.17377.35.13   diskusage   /bin/df -a

The main difference is in the format of the output.
Try configuring this entry, and running "snmpwalk" on this OID,
and you'll see what I mean.

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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.