Is there a way to query multiple variable at the same time?

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


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-24-2008
xiao ren
 
Posts: n/a
Default Is there a way to query multiple variable at the same time?

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

Reply With Quote
  #2 (permalink)  
Old 06-24-2008
Dave Shield
 
Posts: n/a
Default Re: Is there a way to query multiple variable at the same time?

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

Reply With Quote
  #3 (permalink)  
Old 06-24-2008
Dave Shield
 
Posts: n/a
Default Re: Re: Is there a way to query multiple variable at the same time?

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

Reply With Quote
  #4 (permalink)  
Old 06-24-2008
Mike Ayers
 
Posts: n/a
Default RE: Re: Is there a way to query multiple variable at the same time?


> 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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:46 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0