Re: how to get integer from "exec/extend" shell command?

Ernest Beinrohr <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization http://www.axonpro.sk
Message-ID <[email protected]>
On 08.11.2010 21:39, Raphaël 'SurcouF' Bordet wrote:
> Le lundi 08 novembre 2010 à 21:12 +0100, Ernest Beinrohr a écrit :
>> Hi, i have a simple script which always returns and integer, I have it
>> in my snmpd.conf as "exec test1 /bin/test.sh" and also as "extend
>> test1 /bin/test.sh". Unfortunately, none of there returns an integer
>> with the value from the script. Only a string. Is is somehow possible
>> to get an integer?
> Hi,
>
>   This question was already queried this month by Angelo Höngens...
> The response is to use UCD-SNMP-MIB::extResult (for exec) or
> NET-SNMP-MIB::nsExtendResult (for extend) instead of
> UCD-SNMP-MIB::extOutput or NET-SNMP-MIB::nsExtendOutput1Line,
> respectively.

Well, that does not really help, I've tried. My number is quite large,
like bytes on and interface. Too big for return value.

-- 
Ernest Beinrohr
Ing <http://www.beinrohr.sk/ing.php>, RHCE 
<http://www.beinrohr.sk/rhce.php>, LPIC 
<http://www.beinrohr.sk/lpic.php>, +421-2--6241-0360 
<callto://+421-2--6241-0360>, +421-903--482-603 <callto://+421-903--482-603>
icq:28153343, skype:oernii-work <callto://oernii-work>, 
jabber:[email protected]
------------------------------------------------------------------------
Fry: Please, Mr. Nixon! We're appealing to your sense of decency!

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev

_______________________________________________
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.