RE: perl pass_persist getnext/getbulk - no end of MIB
Hi all, GETBULK always fills the returned buffer, so if your request does not completely fill the returned buffer, the agent will read further in the OID tree to fill the buffer. (please have a look at http://jmjmon.eu/LaSupervisionDeReseau/SNMP_Mon-V010.pdf page 74 and further) From my understanding, the problem does not come from GETBULK, either from snmptable that do not clean-up the overhead used to fill the buffer. When I use GETBULK I always (see same URL page 81 and 115) check that the last returned information is an answer to the requested OID, and not used-to-fill information. Hope this helps Best regards JMJ -Message d'origine- De : Turbo Fredriksson [mailto:tu...@bayour.com] Envoyé : dimanche 12 juillet 2015 21:46 À : net-snmp-users@lists.sourceforge.net Objet : perl pass_persist getnext/getbulk - no end of MIB I've been fixing some issues with my MIB (or at least tried to, see the Integer64 support thread). In doing so, I discovered some minor issues and one that's . irritating. The log file is from the output of the pass_persist script (https://github.com/FransUrbo/snmp-modules/blob/master/zfs/zfs-snmp-stats.pl) - s n i p - DebianZFS-Jessie64-Devel-Daily:/usr/src# snmpwalk -uro -v2c -cpublic localhost zfsPoolStatusTable BAYOUR-COM-MIB::zfsPoolStatusIndex.1 = INTEGER: 1 BAYOUR-COM-MIB::zfsPoolStatusIndex.2 = INTEGER: 2 BAYOUR-COM-MIB::zfsPoolName.1 = STRING: rpool BAYOUR-COM-MIB::zfsPoolName.2 = STRING: rpool 2 BAYOUR-COM-MIB::zfsPoolGUID.1 = STRING: 4977845871582736322 BAYOUR-COM-MIB::zfsPoolGUID.2 = STRING: 3787144349319647945 BAYOUR-COM-MIB::zfsPoolSize.1 = Opaque: Int64: 8256506880 BAYOUR-COM-MIB::zfsPoolSize.2 = Opaque: Int64: 8256506880 BAYOUR-COM-MIB::zfsPoolAlloc.1 = INTEGER: 132096 BAYOUR-COM-MIB::zfsPoolAlloc.2 = INTEGER: 111616 BAYOUR-COM-MIB::zfsPoolFree.1 = Opaque: Int64: 8256374784 BAYOUR-COM-MIB::zfsPoolFree.2 = Opaque: Int64: 8256395264 BAYOUR-COM-MIB::zfsPoolCap.1 = INTEGER: 0 BAYOUR-COM-MIB::zfsPoolCap.2 = INTEGER: 0 BAYOUR-COM-MIB::zfsPoolDedup.1 = STRING: 1.00 BAYOUR-COM-MIB::zfsPoolDedup.2 = STRING: 1.00 BAYOUR-COM-MIB::zfsPoolHealth.1 = INTEGER: online(4) BAYOUR-COM-MIB::zfsPoolHealth.2 = INTEGER: online(4) BAYOUR-COM-MIB::zfsPoolAltRoot.1 = STRING: - BAYOUR-COM-MIB::zfsPoolAltRoot.2 = STRING: - BAYOUR-COM-MIB::zfsPoolUsedBySnaps.1 = INTEGER: 0 BAYOUR-COM-MIB::zfsPoolUsedBySnaps.2 = INTEGER: 0 BAYOUR-COM-MIB::zfsPoolUsed.1 = INTEGER: 282624 BAYOUR-COM-MIB::zfsPoolUsed.2 = INTEGER: 111616 DebianZFS-Jessie64-Devel-Daily:/usr/src# egrep '[0-9] \.[0-9]' /tmp/zfs-snmp.log 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.1.1 = 1 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.1.2 = 22015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.2.1 = rpool 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.2.2 = rpool 2 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.3.1 = 4977845871582736322 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.3.2 = 3787144349319647945 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.4.1 = 8256506880 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.4.2 = 8256506880 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.5.1 = 132096 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.5.2 = 111616 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.6.1 = 8256374784 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.6.2 = 8256395264 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.7.1 = 0 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.7.2 = 0 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.8.1 = 1.00 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.8.2 = 1.00 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.9.1 = ONLINE 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.9.2 = ONLINE 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.10.1 = - 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.10.2 = - 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.11.1 = 0 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.11.2 = 0 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.12.1 = 282624 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.5.1.12.2 = 111616 2015-07-12 21:29:06 .1.3.6.1.4.1.8767.2.6.6.1.1.1 = 1 DebianZFS-Jessie64-Devel-Daily:/usr/src# - s n i p - Here a snmpwalk work just fine. It outputs the whole zfsPoolStatusTable and as soon as snmpwalk finds the first entry of the next branch, it cancels (?) the continuing requests. However: - s n i p - DebianZFS-Jessie64-Devel-Daily:/usr/src# snmptable -uro -v2c -cpublic localhost zfsPoolStatusTable SNMP table: BAYOUR-COM-MIB::zfsPoolStatusTable zfsPoolName zfsPoolGUID zfsPoolSize zfsPoolAlloc zfsPoolFree zfsPoolCap zfsPoolDedup zfsPoolHealth zfsPoolAltRoot zfsPoolUsedBySnaps zfsPoolUsed rpool 4977845871582736322 8256506880 132096 8256374784 0 1.00online - 0 282624 rpool 2 3787144349319647945 8256506880 111616 8256395264 0 1.00online - 0
perl pass_persist getnext/getbulk - no end of MIB
:29 .1.3.6.1.4.1.8767.2.6.5.1.6.2 = 8256395264 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.7.1 = 0 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.7.2 = 0 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.8.1 = 1.00 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.8.2 = 1.00 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.9.1 = ONLINE 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.9.2 = ONLINE 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.10.1 = - 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.10.2 = - 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.11.1 = 0 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.11.2 = 0 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.12.1 = 282624 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.5.1.12.2 = 111616 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.6.1.1.1 = 1 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.6.1.2.1 = 1198736 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.6.1.3.1 = 1194848 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.6.1.4.1 = 393386496 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.6.1.5.1 = 524515328 2015-07-12 21:30:29 .1.3.6.1.4.1.8767.2.6.6.1.6.1 = 1194848 - s n i p - Here, snmptable claims that there's more columns, not part of the MIB. But they're really not part of that table. But why isn't snmptable stops when it receives the .1.3.6.1.4.1.8767.2.6.6.1.1.1 entry like snmpwalk do (I only have one entry/line in the next table, the zfsARCUsageTable)? And this is the same of ALL my tables. If I add -CB to the snmptable command it works… Is there a special END OF MIB entry I need to output to make it know that it's done? I tried NONE\n, but that didn't work. Tried END\n as well, but no luck there either… I guess, from finding the -CB option in the manpage, that the problem have something to do with GETBULK... -- Life sucks and then you die -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ 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
Problem In GetBulk Handling
I am having a MIB which contain table structure and i have generate code for that with the help of mib2c command mib2c -c mib2c.create-dataset.conf IPsTable It generates the two files IPsTable.c and IPsTable.h. Actually when i send a command for snmpwalk snmpwalk -v2c -c public localhost -Ci IPsTable Its give an output thats states Error: OID not increasing I have traced the log and got to know that we receive only the GET NEXT request and the value of column field increases everytimes i got the request. case MODE_GETNEXT: var = request-requestvb; table_info = netsnmp_extract_table_info(request); snmp_log(LOG_INFO,column : %d\n,table_info-colnum); snmp_log(LOG_INFO,index : %d\n,*(table_info-indexes-val.integer)); if (table_info-colnum RESULT_COLUMN){ table_info-colnum=0; return SNMP_ERR_NOERROR; } x=*(table_info-indexes-val.integer); netsnmp_table_build_result(reginfo, requests, table_info, ASN_INTEGER, (u_char *) result, sizeof(result)); break; Problem arises when the value of column exceed from the number of column we have in MIB's row and its keeps on increasing. I was not been able to increment the value of index. Is there any way so that i can reset the value of column and incement the value of index (means pointing to next row) ? -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet___ 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
snmpd config for getbulk.
Hi, Please help. I have snmpd with below config maxGetbulkRepeats 0 maxGetbulkResponses 4000 When i make snmpbulkwalk with Cr4000 to snmpd i get timeout error sudo snmpbulkwalk -v2c -Cn0 -Cr4000 -c public localhost 1.3.6.1.4.1.22835 | wc -l Timeout: No Response from localhost 0 But when i make snmpbulkwalk with Cr500 i got the total pdu that i need sudo snmpbulkwalk -v2c -Cn0 -Cr500 -c public localhost 1.3.6.1.4.1.22835 | wc -l 3909 My question is 1) Why this timeout occur ? 2) What is limit for snmpd getbulk respond? thanks for help Azam -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net___ 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
GetBulk with Pass-persist
Hi, Currently I am successfully use python and php with pass_persist to handle get and getnext. The problem occurs went I try using getbulk to my pass_persist script. I dont receive any reply from pass_persist. I need to deal with getbulk request. Can anybody give suggestion to me. Thanks -- Mohd Azamhar Bin Muhamad Tawil V.Net Computer Services Sdn Bhd M: +60 *13 300 1013* | T: 1700 81 4222 | F: +6 03 8912 7000 | www.vn.my TG1-07, UPM-MTDC Technology Centre, Universiti Putra Malaysia, 43400, Serdang, Selangor. Malaysia. -- ___ 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
NULL varbind prior to EndOfMib in GetBulk
Version 5.6.1.1, Windows platform... When doing a GetBulk to a proxied agent through snmpd (snmpd is the main agent, proxying to a non net-snmp implementation), snmpd returns an NULL varbind just before the EndOfMib. The last entry of the response has the last OID with its value, followed by the last OID with a NULL varbind, and finally the last OID with an EndOfMib. The error-index of the response is set to 1 with an error-status of noSuchName. This application issuing the request processes this as an error, and none of the OIDs are displayed. If I issue the GetBulk directly to the proxied agent, the extra NULL varbind is not there (just the last OID with its value followed by the last OID with and EndOfMib), and the error-index and error-status are 0, and the response is processed fine. Does anyone know if this is a bug in snmpd? I've seen some reports in the patch lists that suggest removing an extra NULL varbind prior to EndOfMib in various versions, both prior and after 5.6.1.1. I've downloaded the latest (5.7.2), and prior versions as well, but they all seem to operate the same. Thanks for your help... Mike -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ 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
Re: Regarding GetBulk
On 30 September 2011 06:11, Pete Snmp petes...@yahoo.com wrote: 1) We use SNMP v2 for our box. Are you implementing an agent yourself from scratch? Or are you using the Net-SNMP agent? Our client saying we can implement Views in v2, where as we know this is part of v3? The View-based Access Control mechanism is part of the SNMPv3 framework, but has been designed in such as way as to cover protocol requests received using any of the active versions - including SNMPv2c So it is perfectly reasonable (and common), to configure a multi-version agent (such as Net-SNMP) to use views with the two community-based protocols. 2)Apart from that , I have a doubt regarding Master and Sub-Agent implementation ! There is a standard protocol called AgentX for communication between them. As far as the MIB implementation is concerned, I am pretty sure that we dont need to bother about this communication. The Net-SNMP (sub)agent framework was deliberately designed to isolate the MIB implementation code from the protocol used to receive the request. So the exact same MIB code can be used within a Master agent (receiving requests via SNMP) or an AgentX sub-agent (receiving requests via AgentX). The processing of the request is essentially the same, so the MIB-specific code can effectively ignore the protocol stuff. That's handled by the main agent (or subagent) framework. Dave -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 ___ 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
Re: Regarding GetBulk
Dave, This is regarding views and Master/Sub-Agent issues. 1)We use SNMP v2 for our box. Our client saying we can implement Views in v2, where as we know this is part of v3? Do we have views in V2? as far as I know Views exists in V3 only ! 2)Apart from that , I have a doubt regarding Master and Sub-Agent implementation ! There is a standard protocol called AgentX for communication between them. As far as the MIB implementation is concerned, I am pretty sure that we dont need to bother about this communication. But there is specific requirment from the client saying we need to have Master/Sub-Agent implementation experience. As far as I see this is one time configuration while setting up the agent and sub-agents on the box.Once done, we can write /implment MIBS without any concern to Monolithic or Master/Sub? Please let me know your comments. Thanks, Pete.-- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2___ 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
Regarding GetBulk
Hi, As per the definition, GetBulk, which accesses multiple values at one time without using a GetNext message, minimizes the number of protocol exchanges required to retrieve a large amount of information. - what if the retreived information is more than 1500 bytes? how is this handled ? - Is this handled by the agent or UDP? Thanks, -Pete-- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev___ 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
Re: Regarding GetBulk
It should be treated like any other application and fragmented at the IP layer. -Ken On Sep 5, 2011, at 10:50 AM, Pete Snmp wrote: Hi, As per the definition, GetBulk, which accesses multiple values at one time without using a GetNext message, minimizes the number of protocol exchanges required to retrieve a large amount of information. - what if the retreived information is more than 1500 bytes? how is this handled ? - Is this handled by the agent or UDP? Thanks, -Pete -- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev___ 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
Re: GETBULK message change repetition
Hello, my snmp application is created as a Dynamically Loadable Object. And i create my tables with the mib2c tool. I get my data from an internal running deamon which provides the specific data structures. The data call occurs within the function 'module_get_next_data_point' below. The function which provides the data from the deamon called 'get_modul_param_data'. How can i reduce the traffic to my internal data on bulk requests, because on huge data structures its takes a long time if value max_rep=10 on bulk messages. netsnmp_variable_list * moduleTable_get_next_data_point(void **my_loop_context, void **my_data_context, netsnmp_variable_list *put_index_data, netsnmp_iterator_info *mydata) { struct moduleTable_entry *entry = (struct moduleTable_entry *)*my_loop_context; netsnmp_variable_list *idx = put_index_data; if ( entry ) { snmp_log(LOG_DEBUG, moduleTable_get_next_data_point\n); enum mod_pba_error error = error = get_modul_param_data( entry-mod_param, entry-moduleID 0xFF, entry-moduleID 8, UNIX_DOMAIN_SOCKET_PATH_SNMP); snmp_set_var_typed_integer( idx, ASN_INTEGER, entry-moduleID ); idx = idx-next_variable; *my_data_context = (void *)entry; *my_loop_context = (void *)entry-next; return put_index_data; } else { return NULL; } } Norman Original-Nachricht Datum: Tue, 15 Feb 2011 16:09:20 + Von: Dave Shield d.t.shi...@liverpool.ac.uk An: normanrae...@gmx.de CC: net-snmp-users@lists.sourceforge.net Betreff: Re: GETBULK message change repetition On 15 February 2011 15:55, normanrae...@gmx.de wrote: Can i change the max_rep value from the GETBULK message Yes - see the 'snmpbulkwalk(1)' and 'snmpbulkget(1)' man pages. (though if you reduce this to one, it rather defeats the point of using GETBULK rather than GETNEXT!) within the snmpd.conf file? No. The max repetitions count is a feature of the client application. You can't control this using agent configuration settings. Dave -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ 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
Re: GETBULK message change repetition
On 16 February 2011 13:11, normanrae...@gmx.de wrote: I get my data from an internal running deamon which provides the specific data structures. The data call occurs within the function 'module_get_next_data_point' below. Why? The purpose of the 'get_next_data_point' routine is simply to detect which is the appropriate row of the table for this particular request. It will typically work through *all* the rows of the table for each request, but is really only interested in the index values. There's no need to retrieve the actual data until the agent has determined which row is required. So I'd suggest you call get_modul_param_data() from the handler routine, rather than here. The iterator helper isn't the most efficient anyway. But if you're also retrieving a whole lot of unnecessary information every time through, then the performance is going to nosedive! Dave -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ 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
GETBULK message change repetition
Hello, i implement a table with mib2c successfuly. I get my data from internal running deamon which profides the specific data structures for my table. But i observe, if i make an snmptable request the data request is called 10 times, but i only have one data entry within my table. Can i change the max_rep value from the GETBULK message within the snmpd.conf file? Request: snmptable -v 2c -c public -Cf + 192.168.10.71 1.3.6.1.4.1.26958.25.3.3 Print statement from snmpd: Received SNMP packet(s) from UDP: [192.168.10.163]:58098-[192.168.10.71] GETBULK message, non-rep=0, max_rep=10 -- INDUSOL-MODULAR-INSPEKTOR-MIB::modOperStatus.37122 moduleTable_get_next_data_point moduleTable_get_next_data_point moduleTable_get_next_data_point moduleTable_get_next_data_point moduleTable_get_next_data_point moduleTable_get_next_data_point moduleTable_get_next_data_point moduleTable_get_next_data_point moduleTable_get_next_data_point moduleTable_get_next_data_point Sending 264 bytes to UDP: [192.168.10.163]:58098-[192.168.10.71] . . Norman -- NEU: FreePhone - kostenlos mobil telefonieren und surfen! Jetzt informieren: http://www.gmx.net/de/go/freephone -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ 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
Re: GETBULK message change repetition
On 15 February 2011 15:55, normanrae...@gmx.de wrote: Can i change the max_rep value from the GETBULK message Yes - see the 'snmpbulkwalk(1)' and 'snmpbulkget(1)' man pages. (though if you reduce this to one, it rather defeats the point of using GETBULK rather than GETNEXT!) within the snmpd.conf file? No. The max repetitions count is a feature of the client application. You can't control this using agent configuration settings. Dave -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ 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
RE: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
Hi, After a bit of investigaton, the Getnext and bulkget calls go to the next table, by adding a dummy colum entry with the below function call. /*/ case COLUMN_TABLENOOP: { u_char x = '1'; netsnmp_table_build_result(reginfo, requests, table_info, SNMP_NOSUCHOBJECT, (u_char*) x, sizeof(x)); break; } /*/ However the Snmpwalk does not retrive the next table column values, the call reaches the column handler with the call as below, but the snmpwalk stops here, and does not go further. /*/ snmp_set_var_typed_value( request-requestvb, ASN_OCTET_STR, (u_char*)table_entry-rName, table_entry-Name_len); /*/ Any ideas further?? ~Anup -Original Message- From: Shankar, Anup Sent: Friday, September 10, 2010 8:58 PM To: Dave Shield Cc: net-snmp-users@lists.sourceforge.net; Shankar, Anup Subject: RE: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request. Hi Dave, I made the host to network order suggestion, and now it works for Get, GetNext and BulkGet calls. However iam facing a issues with Getnext/Bulk/Snmpwalk get calls going to the next table, the bulk/walk requests are NOT going to next table, it traverses to the beginning of the same table row. Attached is the file. I really appreciate any help in this regard as this is a blocking issue. Thanks, Anup -Original Message- From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield Sent: Friday, August 27, 2010 11:10 AM To: Shankar, Anup Cc: net-snmp-users@lists.sourceforge.net Subject: Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request. On 26 August 2010 12:10, anup.shan...@emc.com wrote: Any one else in the group, have faced this issue. it's extremely high priority to get this issue resolved. Any help in this is highly appreciated. If you want a quick-n-dirty hack to get things working, you could always tweak the vplexDirectorFETable_entry (and similar) structure to include *two* fields for the IP address - one held in host order and one in network order. Then use one for the index processing (in the get_first and get_next routines), and the other in the handler itself (for the column object). Dave -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev ___ 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
RE: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
Hi Dave, I made the host to network order suggestion, and now it works for Get, GetNext and BulkGet calls. However iam facing a issues with Getnext/Bulk/Snmpwalk get calls going to the next table, the bulk/walk requests are NOT going to next table, it traverses to the beginning of the same table row. Attached is the file. I really appreciate any help in this regard as this is a blocking issue. Thanks, Anup -Original Message- From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield Sent: Friday, August 27, 2010 11:10 AM To: Shankar, Anup Cc: net-snmp-users@lists.sourceforge.net Subject: Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request. On 26 August 2010 12:10, anup.shan...@emc.com wrote: Any one else in the group, have faced this issue. it's extremely high priority to get this issue resolved. Any help in this is highly appreciated. If you want a quick-n-dirty hack to get things working, you could always tweak the vplexDirectorFETable_entry (and similar) structure to include *two* fields for the IP address - one held in host order and one in network order. Then use one for the index processing (in the get_first and get_next routines), and the other in the handler itself (for the column object). Dave /* * Note: this file originally auto-generated by mib2c using * : mib2c.iterate.conf 17695 2009-07-21 12:22:18Z dts12 $ */ #include net-snmp/net-snmp-config.h #include net-snmp/net-snmp-includes.h #include net-snmp/agent/net-snmp-agent-includes.h #include Vplexstats.h #include StatsManager.h #include Configurator.h #include OID.h #include Logger.h #include Globals.h USING_VPLEX_NAMESPACE struct vplexDirectorTable_entry; struct vplexDirectorTable_entry * vplexDirectorTable_createEntry( in_addr_t vplexDirectorPrimaryIpAddr); struct vplexDirectorCacheTable_entry * vplexDirectorCacheTable_createEntry( in_addr_t vplexDirectorPrimaryIpAddr); static int agent_shutdown(int majorID, int minorID, void *serverarg, void *clientarg); /** Initializes the vplexStats module */ void init_vplexStats(void) { try { /* here we initialize all the tables we're planning on supporting */ initialize_table_vplexDirectorTable(); initialize_table_vplexDirectorMemTable(); VPLEX_CHANGE_BEGIN snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_SHUTDOWN,agent_shutdown, NULL); VPLEX_CHANGE_END } catch(std::exception e) { LOG(LOG_ERR,Exception :: %s\n,e.what()); exit(0); } } VPLEX_CHANGE_BEGIN static int agent_shutdown(int majorID, int minorID, void *serverarg, void *clientarg) { DEBUGMSGTL((vplexStats:init, shutdown table vplexstatsTable\n)); LOG(LOG_INFO,shutdown stats table \n); return 0; } VPLEX_CHANGE_END /* Typical data structure for a row entry */ /* This is a hack made to the Table entry structures since IP Address index used to be in reversed orded for GETNext and Get Bulk calls. The hack to get things working,is to tweak the vplexDirectorFETable_entry (and similar) structure to include *two* fields for the IP address - one held in host order and one in network order. Then use one for the index processing (in the get_first and get_next routines), and the other in the handler itself (for the column object). */ struct vplexDirectorTable_entry { /* Index values */ in_addr_t vplexDirectorPrimaryIpAddr; in_addr_t vplexDirectorPrimaryIpAddrHostOrder; /* Column values */ in_addr_t vplexDirectorFailoverIpAddr; char vplexDirectorName[NNN]; size_t vplexDirectorName_len; /* Illustrate using a simple linked list */ int valid; struct vplexDirectorTable_entry *next; }; // # Determine the first/last column names /** Initialize the vplexDirectorTable table by defining its contents and how it's structured */ void initialize_table_vplexDirectorTable(void) { oid vplexDirectorTable_oid[] = {1,3,6,1,4,1,1139,21,2,2,1}; const size_t vplexDirectorTable_oid_len = OID_LENGTH(vplexDirectorTable_oid); netsnmp_handler_registration*reg; netsnmp_iterator_info *iinfo; netsnmp_table_registration_info *table_info; DEBUGMSGTL((vplex:init, initializing table vplexDirectorTable\n)); reg = netsnmp_create_handler_registration( vplexDirectorTable, vplexDirectorTable_handler, vplexDirectorTable_oid, vplexDirectorTable_oid_len, HANDLER_CAN_RONLY ); table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info ); netsnmp_table_helper_add_indexes(table_info, ASN_IPADDRESS, /* index: vplexDirectorPrimaryIpAddr */ 0); table_info-min_column = COLUMN_VPLEXDIRECTORPRIMARYIPADDR; table_info-max_column = COLUMN_VPLEXDIRECTORNAME; iinfo = SNMP_MALLOC_TYPEDEF( netsnmp_iterator_info ); iinfo-get_first_data_point
Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
On 26 August 2010 06:27, anup.shan...@emc.com wrote: Could you get a chance to look into this. I've managed to reproduce the problem, yes. (Once I'd stripped out all of the remaining C++ stuff from your example code!) Unfortunately I've only got one day before I leave for a week's holiday, so I'm not going to be able to look at finding a solution for a while. And I can't promise anything about how quickly I'll be looking at it when I get back. The run-up to the start of the academic year is one of the busiest times for University support staff, so Net-SNMP work will have to take a back seat for the time being. Hopefully one of the others will be able to make a suitable suggestion in the meantime. Dave -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ 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
RE: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
Any one else in the group, have faced this issue. it's extremely high priority to get this issue resolved. Any help in this is highly appreciated. Thanks, Anup -Original Message- From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield Sent: Thursday, August 26, 2010 1:20 PM To: Shankar, Anup Cc: net-snmp-users@lists.sourceforge.net Subject: Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request. On 26 August 2010 06:27, anup.shan...@emc.com wrote: Could you get a chance to look into this. I've managed to reproduce the problem, yes. (Once I'd stripped out all of the remaining C++ stuff from your example code!) Unfortunately I've only got one day before I leave for a week's holiday, so I'm not going to be able to look at finding a solution for a while. And I can't promise anything about how quickly I'll be looking at it when I get back. The run-up to the start of the academic year is one of the busiest times for University support staff, so Net-SNMP work will have to take a back seat for the time being. Hopefully one of the others will be able to make a suitable suggestion in the meantime. Dave -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ 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
Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
On 26 August 2010 12:10, anup.shan...@emc.com wrote: Any one else in the group, have faced this issue. it's extremely high priority to get this issue resolved. Any help in this is highly appreciated. If you want a quick-n-dirty hack to get things working, you could always tweak the vplexDirectorFETable_entry (and similar) structure to include *two* fields for the IP address - one held in host order and one in network order. Then use one for the index processing (in the get_first and get_next routines), and the other in the handler itself (for the column object). Dave -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ 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
RE: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
Hi Dave, I changed the code as below, but now Get fails and Get next works. The below is the response. Dev6-MgmtServer:/usr/sbin # snmpget -v 2c -c public 127.0.0.1 1.3.6.1.4.1.1139.21.2.2.5.1.1.128.221.252.35 SNMPv2-SMI::enterprises.1139.21.2.2.5.1.1.128.221.252.35 = No Such Instance currently exists at this OID Dev6-MgmtServer:/usr/sbin # snmpgetnext -v 2c -c public 127.0.0.1 1.3.6.1.4.1.1139.21.2.2.5.1.1.128.221.252.35 SNMPv2-SMI::enterprises.1139.21.2.2.5.1.2.35.252.221.128 = Counter64: 0 The code snipprt is as below:: Any help is highly appreciated. cout initialize_table_vplexDirectorFETable endl; Stringvector idxList; std::vectorDirectorInfo dirList = VPLEXConfigurator::getInstance()-getDirectorsInfo(); VPLEXStatsManager* statsMgr = VPLEXStatsManager::getInstance(); DirectorInfo dir; String ipAddress; for(std::vectorDirectorInfo::iterator i = dirList.begin(); i != dirList.end(); i++) { dir = *i; ipAddress = dir.primaryIpAddress; cout ipAddress ipAddress endl; //vplexDirectorPrimaryIpAddr = htonl(inet_addr(ipAddress.c_str())); vplexDirectorPrimaryIpAddr = inet_addr(ipAddress.c_str()); cout Entry IP vplexDirectorPrimaryIpAddr endl; entry = vplexDirectorFETable_createEntry(vplexDirectorPrimaryIpAddr); entry-valid = 1; /* create a new row in the (unsorted) table */ struct vplexDirectorFETable_entry * vplexDirectorFETable_createEntry( in_addr_t vplexDirectorPrimaryIpAddr ) { struct vplexDirectorFETable_entry *entry; entry = SNMP_MALLOC_TYPEDEF(struct vplexDirectorFETable_entry); if (!entry) return NULL; entry-vplexDirectorPrimaryIpAddr = vplexDirectorPrimaryIpAddr; cout in vplexDirectorFETable_createEntry endl; cout ipAddress--IDX entry-vplexDirectorPrimaryIpAddr endl; entry-next = vplexDirectorFETable_head; vplexDirectorFETable_head = entry; return entry; } /* Example iterator hook routines - using 'get_next' to do most of the work */ netsnmp_variable_list * vplexDirectorFETable_get_first_data_point(void **my_loop_context, void **my_data_context, netsnmp_variable_list *put_index_data, netsnmp_iterator_info *mydata) { *my_loop_context = vplexDirectorFETable_head; struct vplexDirectorFETable_entry *entry = (struct vplexDirectorFETable_entry *)*my_loop_context; cout in vplexDirectorFETable_get_first_data_point endl; cout ipAddress entry-vplexDirectorPrimaryIpAddr endl; netsnmp_variable_list *list = vplexDirectorFETable_get_next_data_point(my_loop_context, my_data_context, put_index_data, mydata ); cout put_index_data *list-val.integer endl; return list; } netsnmp_variable_list * vplexDirectorFETable_get_next_data_point(void **my_loop_context, void **my_data_context, netsnmp_variable_list *put_index_data, netsnmp_iterator_info *mydata) { struct vplexDirectorFETable_entry *entry = (struct vplexDirectorFETable_entry *)*my_loop_context; netsnmp_variable_list *idx = put_index_data; if ( entry ) { cout iam in vplexDirectorFETable_get_next_data_point endl; cout idx idx ipAddress entry-vplexDirectorPrimaryIpAddr endl; //snmp_set_var_typed_integer( idx, ASN_IPADDRESS, entry-vplexDirectorPrimaryIpAddr) ; snmp_set_var_typed_value( idx,ASN_IPADDRESS,(u_char *) entry-vplexDirectorPrimaryIpAddr,\ sizeof(entry-vplexDirectorPrimaryIpAddr)); idx = idx-next_variable; *my_data_context = (void *)entry; *my_loop_context = (void *)entry-next; return put_index_data; } else { return NULL; } } Thx, Anup -Original Message- From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield Sent: Tuesday, August 24, 2010 8:04 PM To: Shankar, Anup Cc: net-snmp-users@lists.sourceforge.net Subject: Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request. On 24 August 2010 13:48, anup.shan...@emc.com wrote: snmp_set_var_typed_integer( idx, ASN_IPADDRESS, ntohl(entry-vplexDirectorPrimaryIpAddr) ); The SMI type IpAddress is not an integer-based type. It is a (four-octet) binary string, which holds the address in network-byte order. See RFC 2758, section 7.1.5 You *might* be able to get away with treating it as an integer in this way, but I certainly don't think you should be returning it in host order. Dave -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart
Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
On 25 August 2010 07:21, anup.shan...@emc.com wrote: I changed the code as below, but now Get fails and Get next works The code snipprt is as below:: Hmmm... I'm not quite sure what is happening here. Could you please post (as attachments) the *complete* code of the MIB module that you are working with. Dave -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ 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
RE: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
Attached is the code.. Thanks for your help. ~Anup -Original Message- From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield Sent: Wednesday, August 25, 2010 12:50 PM To: Shankar, Anup Cc: net-snmp-users@lists.sourceforge.net Subject: Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request. On 25 August 2010 07:21, anup.shan...@emc.com wrote: I changed the code as below, but now Get fails and Get next works The code snipprt is as below:: Hmmm... I'm not quite sure what is happening here. Could you please post (as attachments) the *complete* code of the MIB module that you are working with. Dave /* * Note: this file originally auto-generated by mib2c using * : mib2c.iterate.conf 17695 2009-07-21 12:22:18Z dts12 $ */ #include net-snmp/net-snmp-config.h #include net-snmp/net-snmp-includes.h #include net-snmp/agent/net-snmp-agent-includes.h #include vplexStats.h #include VPLEXStatsManager.h #include VPLEXConfigurator.h #include OID.h #include stdlib.h #includeiostream.h #includestdio.h struct vplexDirectorTable_entry; struct vplexDirectorTable_entry * vplexDirectorTable_createEntry( in_addr_t vplexDirectorPrimaryIpAddr); struct vplexDirectorCacheTable_entry * vplexDirectorCacheTable_createEntry( in_addr_t vplexDirectorPrimaryIpAddr); /**Helper Functions **/ struct counter64 getCounter64(String val) { struct counter64 c64; u_long tmp = strtoul(val.c_str(),NULL,0); c64.high = (tmp 0xULL) 32; c64.low = (tmp 0xULL); return c64; } String getPrimaryIP(netsnmp_table_request_info *table_info) { String ipAddress; struct in_addr tableIdx; long* var = table_info-indexes-val.integer; tableIdx.s_addr = *var; cout tableIdx var endl; String dirIP = inet_ntoa(tableIdx); cout director IP dirIP endl; return dirIP; } OID getAttribute(netsnmp_handler_registration *reginfo,netsnmp_table_request_info *table_info) { //concat. oid* rowOid; long entry=1; int len= 2; int tableOidLen = reginfo-rootoid_len; len = len + reginfo-rootoid_len; cout len len endl; rowOid = (oid*)malloc(sizeof(oid)*len); memcpy(rowOid,reginfo-rootoid,reginfo-rootoid_len * sizeof(oid)); rowOid[tableOidLen] = entry; rowOid[tableOidLen+1] = table_info-colnum; OID Attribute(rowOid,len); free(rowOid); return Attribute; } /** Initializes the vplexStats module */ void init_vplexStats(void) { /* here we initialize all the tables we're planning on supporting */ initialize_table_vplexDirectorTable(); initialize_table_vplexDirectorFETable(); } // # Determine the first/last column names /* Typical data structure for a row entry */ struct vplexDirectorTable_entry { /* Index values */ in_addr_t vplexDirectorPrimaryIpAddr; /* Column values */ /*in_addr_t vplexDirectorPrimaryIpAddr;*/ in_addr_t vplexDirectorFailoverIpAddr; charvplexDirectorName[80]; /* Illustrate using a simple linked list */ int valid; struct vplexDirectorTable_entry *next; }; /** Initialize the vplexDirectorTable table by defining its contents and how it's structured */ void initialize_table_vplexDirectorTable(void) { const oid vplexDirectorTable_oid[] = {1,3,6,1,4,1,1139,21,2,2,1}; const size_t vplexDirectorTable_oid_len = OID_LENGTH(vplexDirectorTable_oid); netsnmp_handler_registration*reg; netsnmp_iterator_info *iinfo; netsnmp_table_registration_info *table_info; DEBUGMSGTL((vplexStats:init, initializing table vplexDirectorTable\n)); reg = netsnmp_create_handler_registration( vplexDirectorTable, vplexDirectorTable_handler, vplexDirectorTable_oid, vplexDirectorTable_oid_len, HANDLER_CAN_RONLY ); table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info ); netsnmp_table_helper_add_indexes(table_info, ASN_IPADDRESS, /* index: vplexDirectorPrimaryIpAddr */ 0); table_info-min_column = COLUMN_VPLEXDIRECTORPRIMARYIPADDR; table_info-max_column = COLUMN_VPLEXDIRECTORNAME; iinfo = SNMP_MALLOC_TYPEDEF( netsnmp_iterator_info ); iinfo-get_first_data_point = vplexDirectorTable_get_first_data_point; iinfo-get_next_data_point = vplexDirectorTable_get_next_data_point; iinfo-table_reginfo= table_info; netsnmp_register_table_iterator( reg, iinfo ); /* Initialise the contents of the table here */ cout initialize_table_vplexDirectorTable endl; std::vectorDirectorInfo dirList = VPLEXConfigurator::getInstance()-getDirectorsInfo(); DirectorInfo dir; String ipAddress
Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
On 25 August 2010 08:30, anup.shan...@emc.com wrote: Attached is the code.. And the header files? What I'm looking to do is to try out your MIB module on my local system, so I can see exactly what is going wrong. In order to do that, I need *ALL* the stuff that you have added (including the C++ objects that you appear to have defined) Or better - a version of the code that uses standalone, hardcoded dummy data (rather than pulling it in from VPLEXConfigurator) , but still displays the same problem. If we can isolate the problem using such a test setup, then it should be possible to apply the same fix to your live setup. Dave -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ 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
RE: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
Attached is the compiled code... -Original Message- From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield Sent: Wednesday, August 25, 2010 1:20 PM To: Shankar, Anup Cc: net-snmp-users@lists.sourceforge.net Subject: Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request. On 25 August 2010 08:30, anup.shan...@emc.com wrote: Attached is the code.. And the header files? What I'm looking to do is to try out your MIB module on my local system, so I can see exactly what is going wrong. In order to do that, I need *ALL* the stuff that you have added (including the C++ objects that you appear to have defined) Or better - a version of the code that uses standalone, hardcoded dummy data (rather than pulling it in from VPLEXConfigurator) , but still displays the same problem. If we can isolate the problem using such a test setup, then it should be possible to apply the same fix to your live setup. Dave /* * Note: this file originally auto-generated by mib2c using * : mib2c.iterate.conf 17695 2009-07-21 12:22:18Z dts12 $ */ #ifndef VPLEXSTATS_H #define VPLEXSTATS_H #if defined(__cplusplus) extern C { #endif /* function declarations */ void init_vplexStats(void); void initialize_table_vplexDirectorTable(void); Netsnmp_Node_Handler vplexDirectorTable_handler; Netsnmp_First_Data_Point vplexDirectorTable_get_first_data_point; Netsnmp_Next_Data_Point vplexDirectorTable_get_next_data_point; void initialize_table_vplexDirectorCacheTable(void); Netsnmp_Node_Handler vplexDirectorCacheTable_handler; Netsnmp_First_Data_Point vplexDirectorCacheTable_get_first_data_point; Netsnmp_Next_Data_Point vplexDirectorCacheTable_get_next_data_point; void initialize_table_vplexDirectorMemTable(void); Netsnmp_Node_Handler vplexDirectorMemTable_handler; Netsnmp_First_Data_Point vplexDirectorMemTable_get_first_data_point; Netsnmp_Next_Data_Point vplexDirectorMemTable_get_next_data_point; void initialize_table_vplexDirectorProcTable(void); Netsnmp_Node_Handler vplexDirectorProcTable_handler; Netsnmp_First_Data_Point vplexDirectorProcTable_get_first_data_point; Netsnmp_Next_Data_Point vplexDirectorProcTable_get_next_data_point; void initialize_table_vplexDirectorFETable(void); Netsnmp_Node_Handler vplexDirectorFETable_handler; Netsnmp_First_Data_Point vplexDirectorFETable_get_first_data_point; Netsnmp_Next_Data_Point vplexDirectorFETable_get_next_data_point; void initialize_table_vplexDirectorFEPortTable(void); Netsnmp_Node_Handler vplexDirectorFEPortTable_handler; Netsnmp_First_Data_Point vplexDirectorFEPortTable_get_first_data_point; Netsnmp_Next_Data_Point vplexDirectorFEPortTable_get_next_data_point; void initialize_table_vplexDirectorBETable(void); Netsnmp_Node_Handler vplexDirectorBETable_handler; Netsnmp_First_Data_Point vplexDirectorBETable_get_first_data_point; Netsnmp_Next_Data_Point vplexDirectorBETable_get_next_data_point; void initialize_table_vplexDirectorBEPortTable(void); Netsnmp_Node_Handler vplexDirectorBEPortTable_handler; Netsnmp_First_Data_Point vplexDirectorBEPortTable_get_first_data_point; Netsnmp_Next_Data_Point vplexDirectorBEPortTable_get_next_data_point; void initialize_table_vplexDirectorCOMPortTable(void); Netsnmp_Node_Handler vplexDirectorCOMPortTable_handler; Netsnmp_First_Data_Point vplexDirectorCOMPortTable_get_first_data_point; Netsnmp_Next_Data_Point vplexDirectorCOMPortTable_get_next_data_point; void initialize_table_vplexDirectorFCPortTable(void); Netsnmp_Node_Handler vplexDirectorFCPortTable_handler; Netsnmp_First_Data_Point vplexDirectorFCPortTable_get_first_data_point; Netsnmp_Next_Data_Point vplexDirectorFCPortTable_get_next_data_point; void initialize_table_vplexDirectorEthPortTable(void); Netsnmp_Node_Handler vplexDirectorEthPortTable_handler; Netsnmp_First_Data_Point vplexDirectorEthPortTable_get_first_data_point; Netsnmp_Next_Data_Point vplexDirectorEthPortTable_get_next_data_point; void initialize_table_vplexVirtualVolumeTable(void); Netsnmp_Node_Handler vplexVirtualVolumeTable_handler; Netsnmp_First_Data_Point vplexVirtualVolumeTable_get_first_data_point; Netsnmp_Next_Data_Point vplexVirtualVolumeTable_get_next_data_point; void initialize_table_vplexStorageVolumeTable(void); Netsnmp_Node_Handler vplexStorageVolumeTable_handler; Netsnmp_First_Data_Point vplexStorageVolumeTable_get_first_data_point; Netsnmp_Next_Data_Point vplexStorageVolumeTable_get_next_data_point; /* column number definitions for table vplexDirectorTable */ #define COLUMN_VPLEXDIRECTORPRIMARYIPADDR1 #define COLUMN_VPLEXDIRECTORFAILOVERIPADDR 2 #define COLUMN_VPLEXDIRECTORNAME 3 /* column number definitions for table vplexDirectorCacheTable */ #define COLUMN_VPLEXDIRECTORCACHEMISS1 #define COLUMN_VPLEXDIRECTORCACHEDIRTY 2 #define COLUMN_VPLEXDIRECTORCACHESUBPAGEOPS 3 #define
RE: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
Hi Dave, Could you get a chance to look into this. Thanks, Anup -Original Message- From: Shankar, Anup Sent: Wednesday, August 25, 2010 1:45 PM To: 'Dave Shield' Cc: net-snmp-users@lists.sourceforge.net Subject: RE: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request. Attached is the compiled code... -Original Message- From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield Sent: Wednesday, August 25, 2010 1:20 PM To: Shankar, Anup Cc: net-snmp-users@lists.sourceforge.net Subject: Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request. On 25 August 2010 08:30, anup.shan...@emc.com wrote: Attached is the code.. And the header files? What I'm looking to do is to try out your MIB module on my local system, so I can see exactly what is going wrong. In order to do that, I need *ALL* the stuff that you have added (including the C++ objects that you appear to have defined) Or better - a version of the code that uses standalone, hardcoded dummy data (rather than pulling it in from VPLEXConfigurator) , but still displays the same problem. If we can isolate the problem using such a test setup, then it should be possible to apply the same fix to your live setup. Dave -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ 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
Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
Hi All, We are using NET-SNMP code for building an SNMP agent for servicing our MIB file. The MIB file reports performance metrics for the hardware. The Table entries in the MIB use IP Address as index. The setup is as below: - NET-SNMP : net-snmp-5.3.0.1-25.25 OS: SLES 10 -- 32bit. The problem iam facing is when I use the SNMPGet to retrieve the table entry it Works. However the GetNext and GetBulk calls fail. I have used the mib2c.iterate.conf to generate the code. snmpget -v 2c -c public 127.0.0.1 1.3.6.1.4.1.1139.21.2.2.5.1.1.128.221.252.35 SNMPv2-SMI::enterprises.1139.21.2.2.5.1.1.128.221.252.35 = Counter64: 0 snmpgetnext -v 2c -c public 127.0.0.1 1.3.6.1.4.1.1139.21.2.2.5.1.1.128.221.252.35 SNMPv2-SMI::enterprises.1139.21.2.2.5.1.2.35.252.221.128 = No Such Instance The below is the code snippet.. -- void initialize_table_vplexDirectorFETable(void) { const oid vplexDirectorFETable_oid[] = {1,3,6,1,4,1,1139,21,2,2,5}; const size_t vplexDirectorFETable_oid_len = OID_LENGTH(vplexDirectorFETable_oid); netsnmp_handler_registration*reg; netsnmp_iterator_info *iinfo; netsnmp_table_registration_info *table_info; DEBUGMSGTL((vplexStats:init, initializing table vplexDirectorFETable\n)); reg = netsnmp_create_handler_registration( vplexDirectorFETable, vplexDirectorFETable_handler, vplexDirectorFETable_oid, vplexDirectorFETable_oid_len, HANDLER_CAN_RONLY ); table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info ); netsnmp_table_helper_add_indexes(table_info, ASN_IPADDRESS, /* index: vplexDirectorPrimaryIpAddr */ 0); table_info-min_column = COLUMN_VPLEXDIRECTORFEOPSREAD; table_info-max_column = COLUMN_VPLEXDIRECTORFEBYTESWRITE; iinfo = SNMP_MALLOC_TYPEDEF( netsnmp_iterator_info ); iinfo-get_first_data_point = vplexDirectorFETable_get_first_data_point; iinfo-get_next_data_point = vplexDirectorFETable_get_next_data_point; iinfo-table_reginfo= table_info; netsnmp_register_table_iterator( reg, iinfo ); /* Initialise the contents of the table here */ struct vplexDirectorFETable_entry *entry; in_addr_t vplexDirectorPrimaryIpAddr; cout initialize_table_vplexDirectorFETable endl; Stringvector idxList; std::vectorDirectorInfo dirList = VPLEXConfigurator::getInstance()-getDirectorsInfo(); VPLEXStatsManager* statsMgr = VPLEXStatsManager::getInstance(); DirectorInfo dir; String ipAddress; for(std::vectorDirectorInfo::iterator i = dirList.begin(); i != dirList.end(); i++) { dir = *i; ipAddress = dir.primaryIpAddress; vplexDirectorPrimaryIpAddr = inet_addr(ipAddress.c_str()); cout Entry IP vplexDirectorPrimaryIpAddr endl; entry = vplexDirectorFETable_createEntry(vplexDirectorPrimaryIpAddr); entry-valid = 1; } } /* create a new row in the (unsorted) table */ struct vplexDirectorFETable_entry * vplexDirectorFETable_createEntry( in_addr_t vplexDirectorPrimaryIpAddr ) { struct vplexDirectorFETable_entry *entry; entry = SNMP_MALLOC_TYPEDEF(struct vplexDirectorFETable_entry); if (!entry) return NULL; entry-vplexDirectorPrimaryIpAddr = vplexDirectorPrimaryIpAddr; entry-next = vplexDirectorFETable_head; vplexDirectorFETable_head = entry; return entry; } /* remove a row from the table */ void vplexDirectorFETable_removeEntry( struct vplexDirectorFETable_entry *entry ) { struct vplexDirectorFETable_entry *ptr, *prev; if (!entry) return;/* Nothing to remove */ for ( ptr = vplexDirectorFETable_head, prev = NULL; ptr != NULL; prev = ptr, ptr = ptr-next ) { if ( ptr == entry ) break; } if ( !ptr ) return;/* Can't find it */ if ( prev == NULL ) vplexDirectorFETable_head = ptr-next; else prev-next = ptr-next; SNMP_FREE( entry ); /* XXX - release any other internal resources */ } /* Example iterator hook routines - using 'get_next' to do most of the work */ netsnmp_variable_list * vplexDirectorFETable_get_first_data_point(void **my_loop_context, void **my_data_context, netsnmp_variable_list *put_index_data, netsnmp_iterator_info *mydata) { *my_loop_context = vplexDirectorFETable_head; return vplexDirectorFETable_get_next_data_point(my_loop_context, my_data_context, put_index_data, mydata ); } netsnmp_variable_list * vplexDirectorFETable_get_next_data_point(void **my_loop_context, void **my_data_context
Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.
On 24 August 2010 13:48, anup.shan...@emc.com wrote: snmp_set_var_typed_integer( idx, ASN_IPADDRESS, ntohl(entry-vplexDirectorPrimaryIpAddr) ); The SMI type IpAddress is not an integer-based type. It is a (four-octet) binary string, which holds the address in network-byte order. See RFC 2758, section 7.1.5 You *might* be able to get away with treating it as an integer in this way, but I certainly don't think you should be returning it in host order. Dave -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ 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
Re: SNMP GetBulk Max PDU size with Max repetitions
On 20 May 2010 21:30, Malathi Panyam malathipan...@yahoo.com wrote: What is the MAX value Max repetitions for GetBulk requests? In terms of the SNMP protocol - none. In terms of the Net-SNMP client tools - none I tried to increase beyond 100 and it resets to 100. That's a limit imposed by the Net-SNMP agent, to try and avoid excessive processing that may well result in too large a response to be returned. is there anyway that we can increase this limit? $ man snmpd.conf maxGetbulkRepeats NUM Sets the maximum number of responses allowed for a single variable in a getbulk request. Set to 0 to enable the default and set it to -1 to enable unlimited. Because memory is allocated ahead of time, sitting this to unlimited is not considered safe if your user population can not be trusted. A repeat number greater than this will be truncated to this value. Dave -- ___ 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
SNMP GetBulk Max PDU size with Max repetitions
Hi, What is the MAX value Max repetitions for GetBulk requests? I tried to increase beyond 100 and it resets to 100. It means we cannot go beyond 100? I am aware that this is linked to that MAx PDU size, is there anyway that we can increase this limit? Thanks and Regards, Malathi -- ___ 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
Re: delegated and getbulk
On Wed, 23 Sep 2009 11:35:19 +1000, John Fisher john.fis...@nec.com.au said: JF Should the delayed instance example process MODE_GETBULK in the same way as MODE_GET and MODE_GETNEXT, except with the extra call to netsnmp_bulk_to_next_fix_requests(requests)? JF http://www.net-snmp.org/dev/agent/delayed__instance_8c-example.html It sounds like the example needs to do this as well, or better we should fix the agent code so this isn't needed. (specifically the bulk_to_next helper should detect this problem). Feel free to file a bug report about it. -- Wes Hardaker Cobham Analytic Solutions -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ 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
Re: delegated and getbulk
On Thu, 17 Sep 2009 18:33:16 +1000, John Fisher john.fis...@nec.com.au said: JF The first MIB object for which I use the delegated flag is fetched JF correctly, but then this object is repeated with the message: After handling the delegated response, set the delegation flag back to 0 and I think it'll fix your problem. -- Wes Hardaker Cobham Analytic Solutions -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ 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
Re: delegated and getbulk
Wes Hardaker wrote: On Thu, 17 Sep 2009 18:33:16 +1000, John Fisher john.fis...@nec.com.au said: JF The first MIB object for which I use the delegated flag is fetched JF correctly, but then this object is repeated with the message: After handling the delegated response, set the delegation flag back to 0 and I think it'll fix your problem. I was already setting the delegated flag back to 0. A search revealed this message http://osdir.com/ml/network.net-snmp.user/2003-07/msg00066.html Here Wes Hardaker suggests the following code: if (cache-reqinfo-mode == MODE_GETBULK) netsnmp_bulk_to_next_fix_requests(requests); This suggestion is very old, seems to be working well, but I have more cases to test. Should the delayed instance example process MODE_GETBULK in the same way as MODE_GET and MODE_GETNEXT, except with the extra call to netsnmp_bulk_to_next_fix_requests(requests)? http://www.net-snmp.org/dev/agent/delayed__instance_8c-example.html -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ 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
delegated and getbulk
List members, I am using the delegated flag in my extension of an snmp agent as described here: http://www.net-snmp.org/dev/agent/delayed__instance_8c-example.html It works well when I test it with snmpwalk, but fails when I use snmpbulkwalk. The first MIB object for which I use the delegated flag is fetched correctly, but then this object is repeated with the message: No more variables left in this MIB View (It is past the end of the MIB tree) This should not be the case. My handler is not called again after the first delegated object. I am not setting HANDLER_CAN_GETBULK I am checking the transaction id as recommended in the example above. Can you offer advice on the information given? Are there known limitations with get bulk and the delegated mechanism? -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ 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
delegated and getbulk (more info)
I am using NET-SNMP version 5.4 configured so: ./configure \ --prefix=${PWD}/net-snmp/install \ --with-perl-modules \ --enable-shared \ --enable-mini-agent \ --with-cc=ppc_82xx-gcc \ --with-ar=ppc_82xx-ar \ --with-linkcc=ppc_82xx-gcc \ --host=powerpc-montavista-linux \ --with-endianness=big \ --with-default-snmp-version=2 \ --with-logfile=/nv/snmpd.log \ --with-persistent-directory=/nv \ --without-rpm \ --disable-embedded-perl \ --disable-perl-cc-checks \ --with-mib-modules=ucd-snmp/dlmod utilities/execute mibII/snmp_mib \ --with-out-mib-modules=target notification notification/snmpNotifyTable notification-log-mib snmp-notification-mib mibII/system_mib mibII/sysORTable mibII/at mibII/ip mibII/tcp mibII/icmp mibII/udp mibII/SetSerialNo snmpv3mibs ucd_snmp agent_mibs agentx utilities disman/event disman/schedule host -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ 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
Getbulk maximum message size: any update?
I saw the problem with getbulk and maximum size message was reported back in june. I tried several versions of netsnmp including 5.4.1 and they all have this issue: when the package create is too big, not a smaller one is created but instead nothing is send at all. I tried to use HP openview in snmpv3 mode with netsnmpd and that completely fails, as the wizard to setup such a combination tries to get some data with getBulk requests. So I wonder: is there any update on this issue? anyone working on fixing it? Regards, Andreas - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ 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
GETBULK returns only few rows of a table even if max-repetions is high
If I issue a getBulk request (with max-repetitions = 30 ) with attached the oids of the columns of a given table that has many rows, the response only contains the elements of two rows and the first column of the third row. The response telegram is only 500 bytes, why the agent doesn't put all the rows in the response? Actually, I have an snmp agent that is connected to an AgentX subagent. The timeout of the connection is not an issue because is set to 60 secs and the response arrives within 3 seconds. Thank you, Antonio. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ 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
RE: GETBULK returns only few rows of a table even if max-repetions is high
Could my problem be related to a small MTU size on my interface? -Original Message- From: DI BACCO ANTONIO - technolabs Sent: Tue 04/12/2007 18.12 To: net-snmp-users@lists.sourceforge.net Subject: GETBULK returns only few rows of a table even if max-repetions is high If I issue a getBulk request (with max-repetitions = 30 ) with attached the oids of the columns of a given table that has many rows, the response only contains the elements of two rows and the first column of the third row. The response telegram is only 500 bytes, why the agent doesn't put all the rows in the response? Actually, I have an snmp agent that is connected to an AgentX subagent. The timeout of the connection is not an issue because is set to 60 secs and the response arrives within 3 seconds. Thank you, Antonio. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___ 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
GetBulk strange response
I have a net-snmp agent connected to an AgentX subagent. When I issue a getbulk to the agent (for example with 5 oids), I receive an SNMP response that contains more than 5 oids, it seems that the agent asks subagent for more objects than the one requested. Anyone had the same problem? - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ 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
Re: GetBulk strange response
On 09/11/2007, [EMAIL PROTECTED] wrote: I have a net-snmp agent connected to an AgentX subagent. When I issue a getbulk to the agent (for example with 5 oids), I receive an SNMP response that contains more than 5 oids, it seems that the agent asks subagent for more objects than the one requested. Yes - that's how the GETBULK request works. Please re-read the specification of this particular request, paying particular attention to the description of max-repetitions. Dave - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ 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
Re: perl usage of the $session-getbulk()
HH == Harrie Hazewinkel [EMAIL PROTECTED] writes: HH It returns a list, but is I print the perticular items HH of the list, I just get the value. It there not some HH way I can get the varbind and then have OID/value? HH @result = $sess-getbulk(0, 5, $vars); The vars reference you've passed in has been modified. Look at the structure for that instead, which will contain a varbindlist of all the results including OIDs, types, etc. Nice to hear from you again Harrie! -- Wes Hardaker Sparta, Inc. - 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.phpp=sourceforgeCID=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
Re: perl usage of the $session-getbulk()
On Thu, Oct 05, 2006 at 11:52:14AM +0200, Harrie Hazewinkel wrote: ...snip... It returns a list, but is I print the perticular items of the list, I just get the value. It there not some way I can get the varbind and then have OID/value? $vars = SNMP::VarList-new( ['ifDescr'], ['ifSpeed'] ); @result = $sess-getbulk( 0, 3, $vars ); use Data::Dumper; print Dumper([EMAIL PROTECTED]); print Dumper($vars); __END__ The @result has just the values for the request, but the $vars are updated to contain everything. $VAR1 = [ 'lo0', '0', 'dp0', '1', 'Enterasys RoamAbout 4102 Wireless Interface a: (802.11a)', '5400' ]; $VAR1 = bless( [ bless( [ 'ifDescr', '1', 'lo0', 'OCTETSTR' ], 'SNMP::Varbind' ), bless( [ 'ifSpeed', '1', '0', 'GAUGE' ], 'SNMP::Varbind' ), bless( [ 'ifDescr', '2', 'dp0', 'OCTETSTR' ], 'SNMP::Varbind' ), bless( [ 'ifSpeed', '2', '1', 'GAUGE' ], 'SNMP::Varbind' ), bless( [ 'ifDescr', '3', 'Enterasys RoamAbout 4102 Wireless Interface a: (802.11a)', 'OCTETSTR' ], 'SNMP::Varbind' ), bless( [ 'ifSpeed', '3', '5400', 'GAUGE' ], 'SNMP::Varbind' ) ], 'SNMP::VarList' ); Carl Hayter Data Network Operations University of Southern California - 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.phpp=sourceforgeCID=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
Re: query about agentx - getbulk support..
On Thu, 2006-01-12 at 03:06 -0800, vijendra agarwal wrote: Can you please let me know if there is any plan to implement getbulk of agentx protocol in near future? There's no explicit timetable for implementing this functionality, no. It is listed in the Feature Requests tracker (#1379500), but that's no guarantee as to how soon anyone will actually tackle the job. It'll probably depend on someone who needs to make use of this feature being prepared/able to do the work (or to fund someone else to do it!) I know around 20% of code flow and data structure used by net-snmp. I have good knowledge about C. so can you tell me, how much time approx will it take if I try to implement it? I really couldn't suggest a meaningful estimate. It might be a two-minute job, since most of the bits are in place. The agent *does* support the AgentX GetBulk protocol request - it simply doesn't try to use it. So tweaking the register_agentx routine to include HANDLER_CAN_GETBULK *might* be sufficient (except that it seems to already do this). But much of this code probably hasn't been tested, and there are a lot of subtle problems in GetBulk handling. So getting it to work reliably might be a long hard slog. I really don't know. Dave --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ 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
query about agentx - getbulk support..
Hi to all, I am using the netsnmp 5.2.1 version. This version is not supporting agentx protocol getbulk request. It makes a get-next request only to subagent. I checked the latest version ( 5.3 )also. That too also not supported the agentx getbulk. I look the developement plan on the net-snmp site. There is no plan for it to implement. Can you please let me know if there is any plan to implement getbulk of agentx protocol in near future? I know around 20% of code flow and data structure used by net-snmp. I have good knowledge about C. so can you tell me, how much time approx will it take if I try to implement it? and Please let me know also if there is any major issue or point where I should give more concentration while implementation. Thanks in advance. waiting for reply.. Bye Vij. --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ 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
Re: GETBULK--GETNEXT conversion in AGENTX.
On Tue, 2005-12-13 at 13:53 +0800, Kurapati M-G19456 wrote: We are using NET-SNMP-5.1.1. We observed that, snmpd is converting a GETBULK request into GETNEXT, and passing on the GETNEXT to a SubAgent. Is this how snmpd is supposed to work? If a given registration explicitly specifies that it can handle GETBULK requests, then they will be passed down to the low-level handler. Otherwise they will be automatically converted into a sequence of GETNEXT requests. This is part of the new(-ish) v5 MIB API. The earlier v4 processing enforced GETBULK-GETNEXT mapping automatically. In principle, the AgentX protocol can handle GETBULK requests, so these *ought* to be passed through to the subagent (which can then make this decision for each registration). But in practise, it looks as if the AgentX communications still uses the v4-style model, so will convert GETBULK into GETNEXT requests before passing them off to the subagent. I'll log this as a feature request/enhancement. Dave --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ 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
GETBULK--GETNEXT conversion in AGENTX.
All, We are using NET-SNMP-5.1.1. We observed that, snmpd is converting a GETBULK request into GETNEXT, and passing on the GETNEXT to a SubAgent. Is this how snmpd is supposed to work? SubAgent is registering bulk_to_next() handler as part of the OID registration. Inspite of this SubAgent is getting only GETNEXT requests. Please clarify. THanks Mahesh
Re: GetBulk timed out
On Thu, 15 Sep 2005 14:33:51 +0530 Bharath (Bharath) wrote: VB We are using NET-SNMP based agent for testing our company's products. VB When this agent gets a GetBulk request with 7 OIDs in the var-binds (num VB rep = 0, max rep = 50), the request gets timed out. GetBulk requests are VB serviced fine if there is only one OID in the var-binds. Each OID VB corresponds to a row in a table. We tried changing the SNMP_MAX_MSG_SIZE, VB SNMP_MAX_PDU_SIZE and even SNMP_MAX_LEN (in snmp.h), but the request keeps VB timing out. The same GetBulk request (with 7 OIDs) worked when the max rep VB was set to 5 (instead of 50). Can anyone help us out? Did you try increasing the timeout? Or running the agent with debug to see if it is still processing the request when you app times out? -- NOTE: messages sent directly to me, instead of the lists, will be deleted unless they are requests for paid consulting services. Robert Story; NET-SNMP Junkie Support: http://www.net-snmp.org/ irc://irc.freenode.net/#net-snmp Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users You are lost in a twisty maze of little standards, all different. --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.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/listinfo/net-snmp-users
GetBulk timed out
Hi, We are using NET-SNMPbased agentfor testing our company's products. Whenthisagentgets a GetBulk request with7 OIDs in the var-binds (num rep = 0, max rep = 50), the request gets timed out.GetBulk requests are serviced fine if there is only one OID in the var-binds. Each OID corresponds to a row in a table. We tried changing the SNMP_MAX_MSG_SIZE, SNMP_MAX_PDU_SIZE and even SNMP_MAX_LEN (in snmp.h), but the request keeps timing out. The same GetBulkrequest (with 7 OIDs) worked when the max rep was set to 5 (instead of 50). Can anyone help us out? Thanks, Bharath and Vasisht,
RE: Subagent failure on GETBULK
On Mon, 6 Jun 2005 16:46:47 +1000 Mark wrote: MH Case 4) MH == MH However, MH When I send a get bulk request to the agent with TWO OID's from MY MH part of the MIB tree (.1.3.6.1.4.1.14010.1.3.2.1 and MH .1.3.6.1.4.1.14010.1.3.2.2) the master SNMP agent receives the MH request, the subagent locks up, and the snmpbulkget command fails. MH MH Master Agent Output: MH MH Received SNMP packet(s) from 127.0.0.1 MH GETBULK message, non-rep=0, max_rep=10 MH -- SNMPv2-SMI::enterprises.14010.1.3.2.1 MH -- SNMPv2-SMI::enterprises.14010.1.3.2.2 MH netsnmp_call_handlers() called illegally RS Can you set a breakpoint in netsnmp_call_handlers() and see RS which of the 4 conditions fail? Not sure how to set a breakpoint in the snmpd application, however if this would really prove useful in deciphering whats going on then I will look into it. For what its worth, In case 4 described in the original post, I have since seen this cause my subagent (snmp1.0.1) to seg fault and dump the core. The GDB back trace of this core file is given below. This subagent is communicating with the master agent (snmpd) using the standard agentX protocol. Core was generated by `./snmp1.0.1'. Program terminated with signal 11, Segmentation fault. . . . (gdb) bt #0 0x401126f8 in netsnmp_table_iterator_helper_handler (handler=0x80eadf0, reginfo=0x80eab10, reqinfo=0x81151c8, requests=0x8114e60) at table_iterator.c:430 #1 0x40066c64 in netsnmp_call_handler (next_handler=0x80eadf0, reginfo=0x80eab10, reqinfo=0x81151c8, requests=0x8114e60) at agent_handler.c:367 #2 0x40067cd4 in netsnmp_call_next_handler (current=0x80eae20, reginfo=0x80dd860, reqinfo=0xa0, requests=0x0) at agent_handler.c:450 #3 0x40114eb1 in table_helper_handler (handler=0x80eae20, reginfo=0x80eab10, reqinfo=0x81151c8, requests=0x8114e60) at table.c:565 #4 0x40066c64 in netsnmp_call_handler (next_handler=0x80eae20, reginfo=0x80eab10, reqinfo=0x81151c8, requests=0x8114e60) at agent_handler.c:367 #5 0x40067cd4 in netsnmp_call_next_handler (current=0x80eae48, reginfo=0x80dd860, reqinfo=0xa0, requests=0x0) at agent_handler.c:450 #6 0x4010c1fd in netsnmp_bulk_to_next_helper (handler=0xa0, reginfo=0x0, reqinfo=0x81151c8, requests=0x8114e60) at bulk_to_next.c:84 #7 0x40066c64 in netsnmp_call_handler (next_handler=0x80eae48, reginfo=0x80eab10, reqinfo=0x81151c8, requests=0x8114e60) at agent_handler.c:367 #8 0x40066e9f in netsnmp_call_handlers (reginfo=0x80eab10, reqinfo=0x81151c8, requests=0x8114e60) at agent_handler.c:430 #9 0x4005ed92 in handle_var_requests (asp=0x81143a0) at snmp_agent.c:2248 #10 0x4005fe76 in handle_pdu (asp=0x81143a0) at snmp_agent.c:3007 #11 0x4005faa8 in netsnmp_handle_request (asp=0x81143a0, status=-1073744104) at snmp_agent.c:2803 #12 0x4005dde2 in handle_snmp_packet (op=1, session=0x80dd860, reqid=6, pdu=0x8115130, magic=0x0) at snmp_agent.c:1659 #13 0x4014a020 in _sess_process_packet (sessp=0x808f720, sp=0x80900d0, isp=0x808f738, transport=0x808f010, opaque=0x8115218, olength=4, packetptr=0x8103820 \234µ\022B\234µ\022B\001, length=1) at snmp_api.c:5117 #14 0x4014ad50 in _sess_read (sessp=0x808f720, fdset=0x808f010) at snmp_api.c:5515 #15 0x4014b344 in snmp_sess_read (sessp=0x808f720, fdset=0xba30) at snmp_api.c:5534 #16 0x4014a352 in snmp_read (fdset=0xba30) at snmp_api.c:5169 #17 0x4005bfc1 in agent_check_and_process (block=1) at snmp_agent.c:539 #18 0x0804a200 in main (argc=1, argv=0x0) at main.c:244 #19 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6 MH Q1) Is there anything my sub-agent must explicitly do in order to MH handle this type of GETBULK command? (I have read net-snmp already MH breaks these down into GETNEXT requests automatically) RS I don't think so. I'm guessing it's a bug in the library or RS one of the handlers. MH Q3) For Case 2) above, the output of snmpgetbulk (not shown) seems MH to suggest that the snmpd is responding simultaneously to 2 separate MH requests (GETBULK 10, GETBULK 10). Is this type of request handled MH correctly when passed off to a sub-agent whose table handlers are of MH the type get_first / get_next ? RS It should be, but there might be bugs... Further to this, my subagent registers to handle multiple tables. When the get bulk request includes 2 OID's near each other (such that the same table handler would need to be invoked at the same time to service both) the subagent fails and the master agent complains as shown below: --- Received SNMP packet(s) from 127.0.0.1 GETBULK message, non-rep=0, max_rep=10 -- SNMPv2-SMI::enterprises.14010.1.3.2.1 -- SNMPv2-SMI::enterprises.14010.1.3.2.2 netsnmp_call_handlers() called illegally --- However, when
Re: Subagent failure on GETBULK
On Mon, 6 Jun 2005 16:46:47 +1000 Mark wrote: MH Case 4) MH == MH However, MH When I send a get bulk request to the agent with TWO OID's from MY part of MH the MIB tree (.1.3.6.1.4.1.14010.1.3.2.1 and .1.3.6.1.4.1.14010.1.3.2.2) MH the master SNMP agent receives the request, the subagent locks up, and the MH snmpbulkget command fails. MH MH Master Agent Output: MH MH Received SNMP packet(s) from 127.0.0.1 MH GETBULK message, non-rep=0, max_rep=10 MH -- SNMPv2-SMI::enterprises.14010.1.3.2.1 MH -- SNMPv2-SMI::enterprises.14010.1.3.2.2 MH netsnmp_call_handlers() called illegally Can you set a breakpoint in netsnmp_call_handlers() and see which of the 4 conditions fail? MH Q1) Is there anything my sub-agent must explicitly do in order to handle MH this type of GETBULK command? (I have read net-snmp already breaks these MH down into GETNEXT requests automatically) I don't think so. I'm guessing it's a bug in the library or one of the handlers. MH Q3) For Case 2) above, the output of snmpgetbulk (not shown) seems to MH suggest that the snmpd is responding simultaneously to 2 separate requests MH (GETBULK 10, GETBULK 10). Is this type of request handled correctly when MH passed off to a sub-agent whose table handlers are of the type get_first / MH get_next ? It should be, but there might be bugs... -- NOTE: messages sent directly to me, instead of the lists, will be deleted unless they are requests for paid consulting services. Robert Story; NET-SNMP Junkie Support: http://www.net-snmp.org/ irc://irc.freenode.net/#net-snmp Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users You are lost in a twisty maze of little standards, all different. --- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61 plasma display: http://www.necitguy.com/?r=20 ___ 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
Subagent failure on GETBULK
Hi, I am using net-snmp 5.1.1. I am using the provided master agent daemon (snmpd) and a sub-agent that I have coded. I am running the master agent with the command /usr/local/sbin/snmpd -f -Le -V My problem relates to when an SNMP GETBULK request arrives at the master agent. Specifically my sub-agent locks up when a GETBULK request with TWO or MORE OID's in the command arrives at the master agent. I have presented the following cases below as follows: 1) GETBULK for 1 OID in system part of the tree (handled by snmpd) - Works 2) GETBULK for 2 OID's in system part of the tree (handled by snmpd) - Works 3) GETBULK for 1 OID in my part of the tree (handled by my sub-agent) - Works 4) GETBULK for 2 OID's in system part of the tree (handled by my sub-agent) - Fails Case 1) == When I send a get bulk request to the agent with ONLY one OID (sysDescr) the master SNMP agent handles this case as expected. snmpbulkget -v2c -c public linux4 .1.3.6.1.2.1.1.1 The master agent prints the following lines (and snmpbulkget prints 10 lines) Received SNMP packet(s) from 127.0.0.1 GETBULK message, non-rep=0, max_rep=10 -- SNMPv2-MIB::sysDescr Case 2) == When I send a get bulk request to the agent with TWO OID's (sysDescr, and sysObjectID) the master SNMP agent handles this case as expected. snmpbulkget -v2c -c public linux4 .1.3.6.1.2.1.1.1 .1.3.6.1.2.1.1.2 The master agent prints the following lines (and snmpbulkget prints 20 lines) Received SNMP packet(s) from 127.0.0.1 GETBULK message, non-rep=0, max_rep=10 -- SNMPv2-MIB::sysDescr -- SNMPv2-MIB::sysObjectID Case 3) == When I send a get bulk request to the agent with ONE OID from MY part of the MIB tree (.1.3.6.1.4.1.14010.1.3.2.1) the master SNMP agent and subagent handles this case as expected. snmpbulkget -v2c -c public linux4 .1.3.6.1.4.1.14010.1.3.2.1, which prints: SNMPv2-SMI::enterprises.14010.1.3.2.1.0 = INTEGER: 2 SNMPv2-SMI::enterprises.14010.1.3.2.2.0 = INTEGER: 0 SNMPv2-SMI::enterprises.14010.1.3.2.3.1.2.1 = INTEGER: 111 SNMPv2-SMI::enterprises.14010.1.3.2.3.1.2.2 = INTEGER: 222 SNMPv2-SMI::enterprises.14010.1.3.2.3.1.3.1 = INTEGER: 10 SNMPv2-SMI::enterprises.14010.1.3.2.3.1.3.2 = INTEGER: 20 SNMPv2-SMI::enterprises.14010.1.3.2.3.1.4.1 = INTEGER: 88150 SNMPv2-SMI::enterprises.14010.1.3.2.3.1.4.2 = INTEGER: 42310 SNMPv2-SMI::enterprises.14010.1.3.2.3.1.5.1 = INTEGER: 50 SNMPv2-SMI::enterprises.14010.1.3.2.3.1.5.2 = INTEGER: 50 NOTE: This part of the tree has 2 scalars, and then a table And the master agent prints the following lines: Received SNMP packet(s) from 127.0.0.1 GETBULK message, non-rep=0, max_rep=10 -- SNMPv2-SMI::enterprises.14010.1.3.2.1 Case 4) == However, When I send a get bulk request to the agent with TWO OID's from MY part of the MIB tree (.1.3.6.1.4.1.14010.1.3.2.1 and .1.3.6.1.4.1.14010.1.3.2.2) the master SNMP agent receives the request, the subagent locks up, and the snmpbulkget command fails. Master Agent Output: Received SNMP packet(s) from 127.0.0.1 GETBULK message, non-rep=0, max_rep=10 -- SNMPv2-SMI::enterprises.14010.1.3.2.1 -- SNMPv2-SMI::enterprises.14010.1.3.2.2 netsnmp_call_handlers() called illegally SNMP Bulk Get Output: snmpbulkget -v2c -c public linux4 .1.3.6.1.4.1.14010.1.3.2.1 .1.3.6.1.4.1.14010.1.3.2.2 Error in packet. Reason: (genError) A general failure occured Failed object: SNMPv2-SMI::enterprises.14010.1.3.2.1.0 === My questions are as follows, Q1) Is there anything my sub-agent must explicitly do in order to handle this type of GETBULK command? (I have read net-snmp already breaks these down into GETNEXT requests automatically) Q2) Is the above failure likely to result from an incorrectly coded agent? (I do not use the net-snmp library in a multi-threaded manner) Q3) For Case 2) above, the output of snmpgetbulk (not shown) seems to suggest that the snmpd is responding simultaneously to 2 separate requests (GETBULK 10, GETBULK 10). Is this type of request handled correctly when passed off to a sub-agent whose table handlers are of the type get_first / get_next ? Thank you for any help provided, -- Mark Hansen --- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61 plasma display: http://www.necitguy.com/?r=20 ___ 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
Re: getbulk
On Sun, Dec 12, 2004 at 05:13:49PM +0200, Moses Reuben wrote: I'm using snmpbulkwalk.c instead of snmpwalk.c - the function snmp_synch_response () returns an error of STAT_TIMEOUT. What is the reason for this, what I need to change in my application to make snmpbulkwalk.c work properly (snmpwalk.c works well). Are you sure that the device you're talking to supports SNMPv2 and bulk requests? Ie. does the snmpbulkwalk command-line work? There are a lot of devices still out there that only do SNMPv1. - Morty --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ ___ 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
Re: Getbulk
On Wed, 8 Dec 2004 17:53:44 +0200, Moses Reuben [EMAIL PROTECTED] said: Moses I'm using the snmpwalk.c to get the route table from my router, Moses during the session the router cpu usage reaches above 80% so I Moses want to use getbulk instead of getnext. What I should change in Moses my client (snmpwalk.c) to do it - or where I can find a client Moses code using getbulk. We have a snmpbulkwalk command that should suit your needs. Moses Thanks Moses Moses Reuben Moses Networking Team Moses E-mail: [EMAIL PROTECTED] -- Wes Hardaker Sparta --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ ___ 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
Re: Perl SNMP module and getbulk
On Sat, 30 Oct 2004 21:23:33 +0100, Chris Boot [EMAIL PROTECTED] said: Chris Can anyone show me an example of how to use SNMP::Session::getbulk? Chris I've used the plain get() and bulkwalk(), but I just can't figure out Chris getbulk... Chris My aim at the moment is to get a few entries from the UCD-SNMP-MIB: Chris UCD-SNMP-MIB::memTotalSwap.0 Chris UCD-SNMP-MIB::memAvailSwap.0 Chris UCD-SNMP-MIB::memTotalReal.0 Chris UCD-SNMP-MIB::memAvailReal.0 my $vbl = [['memTotalSwap]]; $session-getbulk(0, 4, $vbl); should do what you want. The results will be in $vbl. -- Wes Hardaker Sparta --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ 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
Perl SNMP module and getbulk
Hi, Can anyone show me an example of how to use SNMP::Session::getbulk? I've used the plain get() and bulkwalk(), but I just can't figure out getbulk... My aim at the moment is to get a few entries from the UCD-SNMP-MIB: UCD-SNMP-MIB::memTotalSwap.0 UCD-SNMP-MIB::memAvailSwap.0 UCD-SNMP-MIB::memTotalReal.0 UCD-SNMP-MIB::memAvailReal.0 Thanks in advance, Chris -- Chris Boot [EMAIL PROTECTED] http://www.bootc.net/ If you find an attachment called smime.p7s, please ignore it. --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ 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
Re: variable binding question in getBulk
How many variable bindings can be arraranged in a getBulk Message low. It depends. It depends on the values that are being returned, and the capabilities of the two ends of the conversation. I wish to processing getBulk message which variable binding numbers are 44, and max repetitions are 2. Is This supported in net-snmp-5.1.1? Quite possibly - suck it and see. Try with a shorter varbind list and work upwards. Try with the full varbind list, but only 1 max-rep (i.e. the equivalent to GetNext). But I don't see why that shouldn't work. Dave --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php ___ 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
variable binding question in getBulk
Hi, I have a question about variable binding numbers in getBulk Message. How many variable bindings can be arraranged in a getBulk Message low. I wish to processing getBulk message which variable binding numbers are 44, and max repetitions are 2. Is This supported in net-snmp-5.1.1? Best Regards, Hoil - Oh. --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click ___ 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
Re: Getbulk
On more thing, GetBulk will start with the object ID A and ends with OID F. Am I right? or it traverses the whole MIB for which the related OID(s) are given? I'm not quite sure what you mean by that. The result of the GETBULK is simply a concatenation of the equivalent GETNEXT results. So using the same example: GETBULK (3, 5) A B C D E F might return RESPONSEA.1 B.1 C.1D.1 E.1 F.1D.2 E.2 F.2 D.3 E.3 F.3D.4 E.4 F.4 E.1 F.1 Z.0 (with the spacing being just for illustration of the GN equivalents) Note that the last repetition happened to run off the end of the table, so returned the lexically next entry in each case - either looping round to the start of the next column (E.1 F.1), or moving on to a completely unrelated object (Z.0) The agent doesn't know or care when this happens. A larger number of repetitions (e.g. GETNEXT 3, 7) would continue to look for the lexically next entries - regardless of whether they had already occurred earlier (E.2 E.3, F.2 F.3) or were completely unrelated to the main block of information (ZZ.0 ZZZ.0). Does that help, or are you even more confused? Dave --- This SF.Net email sponsored by Black Hat Briefings Training. Attend Black Hat Briefings Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ 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
Re: Getbulk
Thanx a lot Dave for your kind help.. Tina - Original Message - From: Dave Shield [EMAIL PROTECTED] To: Tina Agarwal [EMAIL PROTECTED] Cc: net-snmp-users [EMAIL PROTECTED] Sent: Tuesday, July 13, 2004 3:26 PM Subject: Re: Getbulk Can anybody please explain GETBULK operation and its PDU in detail. I am not able to understand the function of non-repetitions and max-repeators. A GETBULK request is basically a series of GETNEXT requests, all bundled together into the one request. So a request such as GETBULK A B C D E F might expand to the equivalent of GETNEXT A B C GETNEXT D E F GETNEXT D.1 E.1 F.1 GETNEXT D.2 E.2 F.2 GETNEXT D.3 E.3 F.3 GETNEXT D.4 E.4 F.4 (or whatever the next objects happen to be). The max-repeaters value says how many times to repeat the D E F part of the request. The non-repetitions value says where to draw the line between the A B C part of the request (which is only done once) and the D E F request (which is done max-rep times). So the expansion above equates to non-reps = 3 (i.e. just one A B C row) max-reps = 5 (i.e. five D E F based rows) OK? Dave PS: Please - no HTML mail. Thanks. --- This SF.Net email sponsored by Black Hat Briefings Training. Attend Black Hat Briefings Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ 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 --- This SF.Net email sponsored by Black Hat Briefings Training. Attend Black Hat Briefings Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ 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