This is a discussion on Is there a way to query multiple variable at the same time? within the SNMP Users forums, part of the Networking and Network Related category; Hello, there! I'm working on a problem, how can I query multiple variables from a host at one time? ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello, there!
I'm working on a problem, how can I query multiple variables from a host at one time? Some NMS KPI value in my program have to be described as an expression like '(.1.3.6.1.2.1.2.2.1.10./.1.3.6.1.2.1.2.2.1.5.)*800' or '((.1.3.6.1.2.1.2.2.1.10.+.1.3.6.1.2.1.2.2.1.16.)/.1.3.6.1.2.1.2.2.1.5.)*800'. So these seperate variables must be fetched at the same time, otherwise the variable's value would be unusable. I'm using net-snmp 5.4.2 lib. Any advice is appreciated and code example is more helpful. Thank you! -------------- xiao ren 2008-06-24 ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ 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/...net-snmp-users |
|
|||
|
2008/6/24 xiao ren <reign99@21cn.com>:
> how can I query multiple variables from a host at one time? By adding the relevant varbinds to the same request PDU. > Any advice is appreciated Just call "snmp_add_null_var()" several times to add each of the necessary varbinds, before calling 'snmp_send()' or 'snmp_synch_response()' to actually send the request. > and code example is more helpful. See apps/snmpget.c or apps/snmpstatus.c (or almost any of the other command-line tools) for examples. Dave ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ 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/...net-snmp-users |
|
|||
|
2008/6/24 xiao ren <reign99@21cn.com>:
> Is there any way I can put in the expression directly by net-snmp api, > or do I have to code seperately to identify algebra expression? Sorry - that doesn't make sense. Dave ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ 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/...net-snmp-users |
|
|||
|
> From: net-snmp-users-bounces@lists.sourceforge.net > [mailto:net-snmp-users-bounces@lists.sourceforge.net] On > Behalf Of Dave Shield > Sent: Tuesday, June 24, 2008 2:19 AM > 2008/6/24 xiao ren <reign99@21cn.com>: > > Is there any way I can put in the expression directly by > net-snmp api, > > or do I have to code seperately to identify algebra expression? > > Sorry - that doesn't make sense. Fortunately I speak pidgin. The answer to the question is: No, you will need to code the algebra separately, as net-snmp only provides functions for data retrieval (well, it provides more than that, but for this problem only data retrieval). HTH, Mike P.S. O.P., you should clarify your name. I can't help but read it "??", which I sincerely doubt is intended. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ 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/...net-snmp-users |