Re: net-snmp compilation problem
On Tue, Jan 26, 2010 at 8:05 PM, Group wrote: > Thanks for your reply. I have cygwin with full installation which includes > all the packages and also the openssl-0.9.8 package came from cygwin. Also, > i have openssl-devel package shown as already installed (This is confirmed > by going through the setup.exe, and selecting openssl-devel, the status is > keep (for options: Reinstall, Uninstall, keep, Source).). > > Is there any other way to check that openssl-devel package is already > installed?. > > Bart, also you were mentioning that net-snmp configure script can be > mentioned about path of the header files. Can you let me know how can i do > this. Any documentation is also helpful. Thanks in advance. > Building for Cygwin is documented here: http://net-snmp.sourceforge.net/docs/README.win32.html The command below works fine on my setup (Cygwin 1.7). As you can see the Net-SNMP 5.5 configure script is able to detect the OpenSSL library (-lcrypto) and header files even without passing --with-openssl=/usr to the configure script. This should also work with older Cygwin versions. $ ./configure --with-defaults --without-perl-modules --disable-embedded-perl && grep -E 'NETSNMPLIBS|SSL' config.status && make -s && agent/snmpd -f -Lo [ ... ] S["LNETSNMPLIBS"]=" -lcrypto" D["HAVE_OPENSSL_AES_H"]=" 1" D["HAVE_OPENSSL_DH_H"]=" 1" D["HAVE_OPENSSL_DES_H"]=" 1" D["HAVE_OPENSSL_HMAC_H"]=" 1" D["HAVE_OPENSSL_EVP_H"]=" 1" D["NETSNMP_USE_OPENSSL"]=" 1" [ ... ] 2010-01-27 09:03:27 Turning on AgentX master support. 2010-01-27 09:03:27 NET-SNMP version 5.5 Bart. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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: when snmpwalk query my private trap OID the snmpd routine auto termination
-- Original -- From: "Dave Shield"; Date: Tue, Jan 26, 2010 05:54 PM To: "Alexander King"; Cc: "net-snmp-users"; Subject: Re: when snmpwalk query my private trap OID the snmpd routine auto termination Thank you for providing the full code. Compiling this, it became clear very quickly that the problem is nothing to do with the handling of notifications. I tried the following: - Commented out all of the code relating to traps; compiled the agent; walked your subtree. This listed the first four scalars (up to systemType) and then the agent crashed. - Restarted the agent; Issued a GET request on The agent crashed again. - Restarted the agent; Issued a GET request on The agent crashed again. i had deleted all the code related to the two objects(in mib file,register function,traps),and I re-compiled the source use ./configure --with-mib-modules="uit" make make install reboot the system,and I can walk all the info use MG-soft,the snmpd didnot auto termination ,the walk result are quite right(not systemJBODNumber.0 and systemStatus.0) But I didnot reveived one trap!I think it is maybe something wrong config or something,so I use ps aux |grep snmpd|grep -v grep|awk '{print $2}'|xargs kill ps aux |grep snmptrapd|grep -v grep|awk '{print $2}'|xargs kill /usr/local/sbin/snmpd -C -c /usr/local/share/snmp/snmpd.conf -M /usr/local/share/snmp/mibs/ /usr/local/sbin/snmptrapd -C -c /usr/local/share/snmp/snmptrapd.conf via CLI,but the snmpd daemon down quickly!is it something with my config file? I checked the handler function on systemJBODNumber and systemStatus,objectively speaking,I hadnot found something apparently wrong contrast to the other object handler function.I will check it more carefully again later. Alex - Commented out the registration of these two objects; compiled the agent; walked your subtree. This complete successfully. You need to look more closely at the handler routines for these two MIB objects. Some more general advice: Don't try to implement the whole MIB in one go. Build it up piece by piece. Start with the code for the scalar objects - and check each of these individually (using "snmpget"). Once your happy that these work in isolation, run "snmpwalk" on the whole lot to make sure things are OK. Then move on to the table Once you're happy that the main management objects are working properly - *then* (and only then) is it sensible to start thinking about the notifications. Trying to do everything in one go - particularly when you are not very experienced - is simply asking for trouble. There's also a problem with the implementation of the IP address and PhysAddress objects. These are meant to be *binary* strings, not text strings. You need something like unsigned char ipaddress[] = {201, 201, 201, 201}; unsigned char macaddress[] = {0, 0x0c, 0x29, 0xd5, 0xbc, 0xb7 }; and then use "sizeof" rather than "strlen" in the handler routines. But the basic problem is in the handler routines for the Status and JBODNumber objects. Dave -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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 -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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: compiling net-snmp 5.5 on AIX 6.1 fails
I solved my problem: ./configure --without-kmem-usage --enable-static --enable-shared --prefix=/opt/freeware/net-snmp --with-default-snmp-version="3" --with-sys-location="Almere" --with-sys-contact="r...@sara.nl" --with-persistent-directory="/etc/snmp" --with-logfile="/var/log/snmpd.log" --with-openssl --with-pic gave the message below: configure: WARNING: libperfstat.h: present but cannot be compiled configure: WARNING: libperfstat.h: check for missing prerequisite headers? configure: WARNING: libperfstat.h: see the Autoconf documentation configure: WARNING: libperfstat.h: section "Present But Cannot Be Compiled" configure: WARNING: libperfstat.h: proceeding with the preprocessor's result configure: WARNING: libperfstat.h: in the future, the compiler will take precedence configure: WARNING: ## ## configure: WARNING: ## Report this to net-snmp-cod...@lists.sourceforge.net ## configure: WARNING: ## ## found patch: 2886598 which stated to add #include to all files which include libperfstat.h before the include of libperfstat.h added: #include to the following files: agent/mibgroup/hardware/cpu/cpu_perfstat.c agent/mibgroup/hardware/memory/memory_aix.c agent/mibgroup/host/hr_storage.c agent/mibgroup/mibII/icmp.c agent/mibgroup/mibII/ip.c agent/mibgroup/mibII/tcp.c agent/mibgroup/mibII/udp.c agent/mibgroup/ucd-snmp/diskio.c agent/mibgroup/ucd-snmp/loadave.c agent/mibgroup/ucd-snmp/memory_aix4.c One question remains though, how do I generate an rpm out of this??? Met vriendelijke groet, Willem Hilders SARA ICT Services Email: willem.hild...@sara.nl Telefoon: 036-5238013 Fax: 036-5238030 -Original Message- From: Thomas Anders [mailto:thomas.and...@blue-cable.de] Sent: dinsdag 26 januari 2010 17:19 To: net-snmp-users@lists.sourceforge.net Subject: Re: compiling net-snmp 5.5 on AIX 6.1 fails Willem Hilders wrote: > When I compile net-snmp version 5.5 on my AIX 6.1 machine I get the > errors underneath when I issue the make statement. Any one any idea how > to solve this > > In file included from /usr/include/sys/cred.h:49, > from /usr/include/sys/file.h:32, > from system.c:110: > > /usr/include/sys/secattr.h:50: error: parse error before "rid_t" What compiler (and version) are you using? Do you by chance also have another compiler available? Please note that the compiler complains about a system header file, not about the net-snmp source. Please have a look into /usr/include/sys/secattr.h to find out what the compiler is choking on. +Thomas -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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 -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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: compiling net-snmp 5.5 on AIX 6.1 fails
I solved my problem: ./configure --without-kmem-usage --enable-static --enable-shared --prefix=/opt/freeware/net-snmp --with-default-snmp-version="3" --with-sys-location="Almere" --with-sys-contact="r...@sara.nl" --with-persistent-directory="/etc/snmp" --with-logfile="/var/log/snmpd.log" --with-openssl --with-pic gave the message below: configure: WARNING: libperfstat.h: present but cannot be compiled configure: WARNING: libperfstat.h: check for missing prerequisite headers? configure: WARNING: libperfstat.h: see the Autoconf documentation configure: WARNING: libperfstat.h: section "Present But Cannot Be Compiled" configure: WARNING: libperfstat.h: proceeding with the preprocessor's result configure: WARNING: libperfstat.h: in the future, the compiler will take precedence configure: WARNING: ## ## configure: WARNING: ## Report this to net-snmp-cod...@lists.sourceforge.net ## configure: WARNING: ## ## found patch: 2886598 which stated to add #include to all files which include libperfstat.h before the include of libperfstat.h added: #include to the following files: agent/mibgroup/hardware/cpu/cpu_perfstat.c agent/mibgroup/hardware/memory/memory_aix.c agent/mibgroup/host/hr_storage.c agent/mibgroup/mibII/icmp.c agent/mibgroup/mibII/ip.c agent/mibgroup/mibII/tcp.c agent/mibgroup/mibII/udp.c agent/mibgroup/ucd-snmp/diskio.c agent/mibgroup/ucd-snmp/loadave.c agent/mibgroup/ucd-snmp/memory_aix4.c One question remains though, how do I generate an rpm out of this??? Met vriendelijke groet, Willem Hilders SARA ICT Services Email: willem.hild...@sara.nl Telefoon: 036-5238013 Fax: 036-5238030 From: Fulko Hew [mailto:fulko@gmail.com] Sent: dinsdag 26 januari 2010 17:07 To: nets...@mysnmp.org Cc: Willem Hilders; net-snmp-users@lists.sourceforge.net Subject: Re: compiling net-snmp 5.5 on AIX 6.1 fails On Tue, Jan 26, 2010 at 10:14 AM, mailto:nets...@mysnmp.org>> wrote: William, I have had successful compilations on AIX 5.1 and 5.3 with 5.5. What is the configure line you used and gcc version? John Quoting Willem Hilders mailto:willem.hild...@sara.nl>>: > Hi All > > When I compile net-snmp version 5.5 on my AIX 6.1 machine I get the > errors underneath when I issue the make statement. Any one any idea > how to solve this > Thanks in advance > > In file included from /usr/include/sys/cred.h:49, > from /usr/include/sys/file.h:32, > from system.c:110: > /usr/include/sys/secattr.h:50: error: parse error before "rid_t" > /usr/include/sys/secattr.h:65: error: parse error before '}' token > /usr/include/sys/secattr.h:70: error: parse error before "authnum_t" ... snip... I recognize this one. I just had a machine moved from AIX 5.3 to 6.1, and a simple ./configure; make resulted in these errors. In _my_ case I had to have the guy _also_ install a newer version of the gcc toolchain because the old one points to 'old' copies of .h files rather than the 'new' ones that know how to resolve these symbols. Also don't forget to use the patches described in http://sourceforge.net/tracker/index.php?func=detail&aid=2886598&group_id=12694&atid=312694 I searched the patch database for AIX & 6 to get the title 'patch that allows net-snmp 5.4.2.1 to compile on AIX 6.1' -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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: when snmpwalk query my private trap OID the snmpd routine auto termination
2010/1/27 Alexander King : > I checked the handler function on systemJBODNumber and systemStatus, > objectively speaking,I hadnot found something apparently wrong contrast > to the other object handler function.I will check it more carefully again > later. Remember that you need to pass a pointer *to* the value that you want to return. You were actually returning this value *AS* a pointer variable. So when the agent dereferenced this pointer later (to retrieve the actual value), this triggered the crash. You also need to look again at how Counter64 values are handled in the Net-SNMP agent. Hint: It's not a simple "long" or "long long" variable. Dave -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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
about net-snmp 64bits data
-- Original -- From: "Dave Shield"; Date: Wed, Jan 27, 2010 05:23 PM To: "Alexander King"; Cc: "net-snmp-users"; Subject: Re: when snmpwalk query my private trap OID the snmpd routine auto termination 2010/1/27 Alexander King : > I checked the handler function on systemJBODNumber and systemStatus, > objectively speaking,I hadnot found something apparently wrong contrast > to the other object handler function.I will check it more carefully again > later. Remember that you need to pass a pointer *to* the value that you want to return. You were actually returning this value *AS* a pointer variable. So when the agent dereferenced this pointer later (to retrieve the actual value), this triggered the crash. I will test this again. You also need to look again at how Counter64 values are handled in the Net-SNMP agent. Hint: It's not a simple "long" or "long long" variable. I did this: prefix = /usr/local \ --enable-shared \ --with-default-snmp-version=2 \ --with-mib-modules="uit" \ --enable-mfd-rewrites and use uint64_t in my c source code,is it right? Dave -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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-- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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: about net-snmp 64bits data
2010/1/27 Alexander King : > You also need to look again at how Counter64 values are handled in the > Net-SNMP agent. Hint: It's not a simple "long" or "long long" variable. > > I did this: > and use uint64_t in my c source code,is it right? No. Please look at how Counter64 objects are handled elsewhere in the agent. Dave -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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
Little OT - Mock agent for testing SNMP OIDs - any OID, would prefer to use Net-SNMP for the basis of this
Hi all, I have been searching through the Net-SNMP source to see if there is a framework to do with with Net-SNMP, tried to set pass_persist up to do this, does not seem it will let me overwrite responses to built in OIDs. I really want a regression testing framework for our SNMP-based programs / scripts, we use Net-SNMP extensively so I am hoping to use it as a test harness as well :). However, I really would like to be able to mock out any OID with this agent and just have it act as a real harness, providing only data our test cases provide. I see an agent listener using TwistedSNMP that does this, but since we use Net-SNMP almost exclusively, would be the best to have it be our container. Anyone know of a way to do this with Net-SNMP that does this? Is the best solution to recompile a test agent with no mibs except for pass_persist so that pass_persist can then respond to any OID at or below 1.3.6.1? Or would that plain fail too? I am not by any means an expert at the C parts of Net-SNMP though I have poked around in the C files as needed and I submitted one small patch to the pass_persist table handler that resolved a crash. Any advice / help appreciated, am doing my best to do leg work on this, but so far not coming up with any way to do this with Net-SNMP as the SNMP mock server container .. Thank you, Max -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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: SNMP v3 help
What would you suggest me to do if I have following requirement. 1. Receive V3 trap 2. Decode v3 trap somehow. I don't know this step. 3. Print the values like, oid , agentaddr etc from a perl script. Best regards, Rupesh From: Gaikwad, Rupesh Sent: Wednesday, January 27, 2010 4:33 PM To: net-snmp-users Subject: SNMP v3 help Hello All, I have configured snmptrapd and I can receive V3 AuthPriv traps very well on my test machine. But, now I want to know how I can receive and print trap from perl. I have searched many links and found Net-SNMPTrapd-0.02 > Net::SNMPTrapd. But this modules/ examples does not support v3. Otherwise it's something exact what I am looking for. Any help is appreciated. Best regards, Rupesh -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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
SNMP v3 help
Hello All, I have configured snmptrapd and I can receive V3 AuthPriv traps very well on my test machine. But, now I want to know how I can receive and print trap from perl. I have searched many links and found Net-SNMPTrapd-0.02 > Net::SNMPTrapd. But this modules/ examples does not support v3. Otherwise it's something exact what I am looking for. Any help is appreciated. Best regards, Rupesh -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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: about net-snmp 64bits data
Dave,about 64bits data run on net-snmp I found something below,it is in the right direction? 00080 #define IS_CONSTRUCTOR(byte)((byte) & ASN_CONSTRUCTOR) 00081 #define IS_EXTENSION_ID(byte) (((byte) & ASN_EXTENSION_ID) == ASN_EXTENSION_ID) 00082 00083 struct counter64 { 00084 u_long high; 00085 u_long low; 00086 }; 00087 00088 #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES 00089 typedef struct counter64 integer64; 00090 typedef struct counter64 unsigned64; /*- * IP-MIB::ipSystemStatsEntry.ipSystemStatsHCInReceives * ipSystemStatsHCInReceives is subid 4 of ipSystemStatsEntry. * Its status is Current, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.4.31.1.1.4 * Description: The total number of input IP datagrams received, including those received in error. This object counts the same datagrams as ipSystemStatsInReceives but allows for larger values. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ipSystemStatsDiscontinuityTime. * * Attributes: * accessible 1 isscalar 0 enums 0 hasdefval 0 * readable 1 iscolumn 1 ranges 0 hashint 0 * settable 0 * * * Its syntax is COUNTER64 (based on perltype COUNTER64) * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) */ /** * Extract the current value of the ipSystemStatsHCInReceives data. * * Set a value using the data context for the row. * * @param rowreq_ctx *Pointer to the row request context. * @param ipSystemStatsHCInReceives_val_ptr *Pointer to storage for a U64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP: skip this node (no value for now) * @retval MFD_ERROR : Any other error */ int ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, U64 * ipSystemStatsHCInReceives_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipSystemStatsHCInReceives_val_ptr); /* * TODO:231:o: |-> copy ipSystemStatsHCInReceives data. * get (* ipSystemStatsHCInReceives_val_ptr ).low and (* ipSystemStatsHCInReceives_val_ptr ).high from rowreq_ctx->data */ (*ipSystemStatsHCInReceives_val_ptr).low = rowreq_ctx->data->stats.HCInReceives.low; (*ipSystemStatsHCInReceives_val_ptr).high = rowreq_ctx->data->stats.HCInReceives.high; return MFD_SUCCESS; } + case ASN_COUNTER64: + /* We want an integer here */ + if ((SvTYPE(value) == SVt_IV) || (SvTYPE(value) == SVt_PVMG)) { + /* Good - got a real one (or a blessed scalar which we have to hope will turn out OK) */ + ulltmp = SvIV(value); + c64.high = (ulltmp & 0xULL) >> 32; + c64.low = (ulltmp & 0xULL); + snmp_set_var_typed_value(request->requestvb, (u_char)type, + (u_char *) &c64, sizeof(struct counter64)); + RETVAL = 1; + break; + } + else if (SvPOKp(value)) { + /* Might be OK - got a string, so try to convert it, allowing base 10, octal, and hex forms */ + stringptr = SvPV(value, stringlen); + ulltmp = strtoul( stringptr, NULL, 0 ); + if (errno == EINVAL) { + snmp_log(LOG_ERR, "Could not convert string to number in setValue: '%s'", stringptr); + RETVAL = 0; + break; + } + + c64.high = (ulltmp & 0xULL) >> 32; + c64.low = (ulltmp & 0xULL); + snmp_set_var_typed_value(request->requestvb, (u_char)type, + (u_char *) &c64, sizeof(struct counter64)); + RETVAL = 1; + break; + } -- Original -- From: "Dave Shield"; Date: Wed, Jan 27, 2010 06:55 PM To: "Alexander King"; Cc: "net-snmp-users"; Subject: Re: about net-snmp 64bits data 2010/1/27 Alexander King : > You also need to look again at how Counter64 values are handled in the > Net-SNMP agent. ? Hint:? It's not a simple "long" or "long long" variable. > > I did this: > and use uint64_t in my c source code,is it right? No. Please look at how Counter64 objects are handled elsewhere in the agent. Dave -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please
How to disable/enable SNMP V1 and V2 on the fly?
Hi, thank you all for the help of my previous questions. Problems were solved according to your answer. I have another question: I have an agent running for all the SNMP versions. 1. I want to disable/enable SNMP V1, V2 for the whole agent on the fly, What net-snmp command should I use or which OID should I set to do this while I don't have to restart the agent and redo the configure? 2. Right now I have "rwcommunity public" in the /usr/local/share/snmp/snmpd.conf file for community string. Which net-snmp command alow me to change the community name? Chi -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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: net-snmp compilation problem [solved]
Hi Bart, With your configure command as reference, I have tried with ./configure --without-perl-modules --disable-embedded-perl --with-openssl="/usr". I'm able to compile the code with make: These are the last lines of the compilation: ... chmod a+x net-snmp-config touch net-snmp-config-x and for 'make install' ... install: installed SNMPv2-TM.txt in /usr/local/share/snmp/mibs libtool: install: /usr/bin/install -c -m 644 ./NET-SNMP-VACM-MIB.txt /usr/local/ share/snmp/mibs/NET-SNMP-VACM-MIB.txt install: installed NET-SNMP-VACM-MIB.txt in /usr/local/share/snmp/mibs libtool: install: /usr/bin/install -c -m 644 ./DISMAN-SCHEDULE-MIB.txt /usr/loca l/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt install: installed DISMAN-SCHEDULE-MIB.txt in /usr/local/share/snmp/mibs make[1]: Leaving directory `/home/mallik/net-snmp-5.5/mibs' Thanks for the help. On Wed, Jan 27, 2010 at 2:10 AM, Bart Van Assche wrote: > On Tue, Jan 26, 2010 at 8:05 PM, Group wrote: > >> Thanks for your reply. I have cygwin with full installation which includes >> all the packages and also the openssl-0.9.8 package came from cygwin. Also, >> i have openssl-devel package shown as already installed (This is confirmed >> by going through the setup.exe, and selecting openssl-devel, the status is >> keep (for options: Reinstall, Uninstall, keep, Source).). >> >> Is there any other way to check that openssl-devel package is already >> installed?. >> >> Bart, also you were mentioning that net-snmp configure script can be >> mentioned about path of the header files. Can you let me know how can i do >> this. Any documentation is also helpful. Thanks in advance. >> > > Building for Cygwin is documented here: > http://net-snmp.sourceforge.net/docs/README.win32.html > > The command below works fine on my setup (Cygwin 1.7). As you can see the > Net-SNMP 5.5 configure script is able to detect the OpenSSL library > (-lcrypto) and header files even without passing --with-openssl=/usr to the > configure script. This should also work with older Cygwin versions. > > $ ./configure --with-defaults --without-perl-modules > --disable-embedded-perl && grep -E 'NETSNMPLIBS|SSL' config.status && make > -s && agent/snmpd -f -Lo > [ ... ] > S["LNETSNMPLIBS"]=" -lcrypto" > D["HAVE_OPENSSL_AES_H"]=" 1" > D["HAVE_OPENSSL_DH_H"]=" 1" > D["HAVE_OPENSSL_DES_H"]=" 1" > D["HAVE_OPENSSL_HMAC_H"]=" 1" > D["HAVE_OPENSSL_EVP_H"]=" 1" > D["NETSNMP_USE_OPENSSL"]=" 1" > [ ... ] > 2010-01-27 09:03:27 Turning on AgentX master support. > 2010-01-27 09:03:27 NET-SNMP version 5.5 > > Bart. > -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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: SNMP v3 help
> From: Gaikwad, Rupesh [mailto:rupesh_gaik...@bmc.com] > Sent: Wednesday, January 27, 2010 3:34 AM > What would you suggest me to do if I have following requirement. > > 1. Receive V3 trap > > 2. Decode v3 trap somehow. I don’t know this step. > > 3. Print the values like, oid , agentaddr etc from a perl script. http://www.net-snmp.org/docs/man/snmptrapd.conf.html I point you to the traphandle command, but read the whole page, please. HTH, Mike -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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: Net::SNMP usage
My mistake, sorry about that, it was tough to track down support for Net::SNMP and I thought I had the right mailing list. Thanks! -john Original message >Date: Tue, 26 Jan 2010 21:04:14 -0500 >From: max.schub...@gmail.com (on behalf of Max ) >Subject: Re: Net::SNMP usage >To: John Fulton >Cc: net-snmp-users@lists.sourceforge.net > >Hi John, > >Wrong list, Net::SNMP is not associated with the Net-SNMP project, >though Net::SNMP works very well with the Net-SNMP agent. > >See the perldoc for Net::SNMP, it explains clearly how to access >variables in the returned hash. > >I use Net::SNMP extensively, if you have problems after reading the >perldoc for Net::SNMP and looking at the examples that come with the >module I would be glad to answer you off list. > >- Max > >On Tue, Jan 26, 2010 at 7:42 PM, John Fulton wrote: >> I have several monitoring scripts that pull SNMP stats off of switches and >> routers that I have used for the past 10 years using perl by running snmpget >> and parsing the program output into variables: >> >> Ex: >> === >> open(GETIN, "/usr/bin/snmpget -Oqf -v2c -c public 192.168.1.20 >> interfaces.ifTable.ifEntry.ifInOctets.1 |"); >> (@temp) = split(/\s+/, ); >> $inBytes = $temp[$#temp]; >> === >> >> Pretty rough, but it's worked for us for over 10 years. >> >> I have decided to torture myself by learning to use Net::SNMP instead of >> modifying our older scripts for pulling stats off of some of our newer >> equipment. >> >> The purpose is to create a comma delimited file of statistics from these >> devices (satellite modems). I have created the array of OID values to >> retrieve, and have pulling the info from the device, but have hit a bit of a >> roadblock in my understanding on parsing the output to get the returned >> values. >> >> Here is what I have sofar: >> - >> #!/usr/bin/perl >> >> use Net::SNMP; >> >> $SNMP_COMMUNITY = "public"; >> $SNMP_VERSION = "2"; >> >> $VSAT_ANCH_IP = "172.16.0.40"; >> >> @VSAT_ANCH_OID = ('1.3.6.1.4.1.2591.26.1.8.1.1.8.1.1', #CA Rx >> '1.3.6.1.4.1.2591.26.1.8.1.1.8.3.1', #UN Rx >> '1.3.6.1.4.1.2591.26.1.8.1.1.8.3.2', #GA Rx >> '1.3.6.1.4.1.2591.26.1.8.1.1.8.3.4', #CB Rx >> '1.3.6.1.4.1.2591.26.1.8.1.1.8.3.5', #SG Rx >> '1.3.6.1.4.1.2591.26.1.8.1.1.8.4.1', #SP Rx >> '1.3.6.1.4.1.2591.26.1.8.1.1.8.4.2', #KC Rx >> '1.3.6.1.4.1.2591.26.1.8.1.1.8.4.3', #NO Rx >> '1.3.6.1.4.1.2591.26.1.8.1.1.8.4.4', #FY Rx >> '1.3.6.1.4.1.2591.26.1.8.1.1.8.4.5', #SA Rx >> '1.3.6.1.4.1.2591.26.1.8.1.1.8.4.6', #AN Rx >> '1.3.6.1.4.1.2591.26.1.8.1.1.8.4.7', #IL Rx >> '1.3.6.1.4.1.2591.26.1.1.3.0'); #Tx Power Level >> >> ($session, $error) = Net::SNMP->session( >> -hostname => $VSAT_ANCH_IP, >> -version => $SNMP_VERSION, >> -community => $SNMP_COMMUNITY, >> ); >> >> >> $VSAT_ANCH = $session->get_request(-varbindlist => \...@vsat_anch_oid, >> ); >> >> snmp_dispatcher(); >> >> $session->close(); >> - >> Each of those OID values should return an integer value from 1 to -2500. >> >> I do not quite understand how to access the returned results in $VSAT_ANCH >> as what I see in the variable is "HASH(0x9c75270)" when referenced. >> >> Thanks for any help in pointing me in the right direction. >> >> -John Fulton >> >> >> -- >> The Planet: dedicated and managed hosting, cloud storage, colocation >> Stay online with enterprise data centers and the best network in the business >> Choose flexible plans and management services without long-term contracts >> Personal 24x7 support from experience hosting pros just a phone call away. >> http://p.sf.net/sfu/theplanet-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 >> -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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.sou
What these means: int majorID, int minorID, void *serverarg, void *clientarg
Hi All, I am not able to understand the meaning of following parameters. As there numerous function in net-snmp-5.4.2.1 having following parameter. Could someone explain the meaning of these parameters in DETAILS. 1. int majorID 2. int minorID 3. void *serverarg 4. void *clientarg As in function: int snmpv3_store(int majorID, int minorID, void *serverarg, void *clientarg) Rgds, Sanjay -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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
HOST-RESOURCE::hrSWInstalledTable
HI All, I am using Net-SNMP 5.4.2.1. I want to get the list of installed software but hrSWInstalledTable is empty when I run snmpwalk command. My question is: Who will fill the hrSWInstalledTable? Its me or already implemented by the Net-SNMP. Thanks Vivek The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/-- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-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