You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(14) |
Nov
(315) |
Dec
(298) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(254) |
Feb
(467) |
Mar
(430) |
Apr
(345) |
May
(406) |
Jun
(336) |
Jul
(313) |
Aug
(265) |
Sep
(433) |
Oct
(462) |
Nov
(387) |
Dec
(232) |
2002 |
Jan
(352) |
Feb
(556) |
Mar
(463) |
Apr
(500) |
May
(557) |
Jun
(337) |
Jul
(317) |
Aug
(279) |
Sep
(273) |
Oct
(354) |
Nov
(267) |
Dec
(347) |
2003 |
Jan
(351) |
Feb
(445) |
Mar
(520) |
Apr
(665) |
May
(499) |
Jun
(393) |
Jul
(304) |
Aug
(425) |
Sep
(262) |
Oct
(329) |
Nov
(220) |
Dec
(174) |
2004 |
Jan
(365) |
Feb
(479) |
Mar
(515) |
Apr
(522) |
May
(214) |
Jun
(471) |
Jul
(292) |
Aug
(341) |
Sep
(243) |
Oct
(446) |
Nov
(294) |
Dec
(147) |
2005 |
Jan
(171) |
Feb
(209) |
Mar
(218) |
Apr
(321) |
May
(233) |
Jun
(534) |
Jul
(268) |
Aug
(345) |
Sep
(498) |
Oct
(557) |
Nov
(459) |
Dec
(238) |
2006 |
Jan
(288) |
Feb
(180) |
Mar
(151) |
Apr
(113) |
May
(164) |
Jun
(277) |
Jul
(160) |
Aug
(383) |
Sep
(221) |
Oct
(404) |
Nov
(358) |
Dec
(163) |
2007 |
Jan
(293) |
Feb
(175) |
Mar
(202) |
Apr
(155) |
May
(427) |
Jun
(484) |
Jul
(414) |
Aug
(125) |
Sep
(131) |
Oct
(160) |
Nov
(79) |
Dec
(70) |
2008 |
Jan
(133) |
Feb
(115) |
Mar
(158) |
Apr
(194) |
May
(197) |
Jun
(230) |
Jul
(146) |
Aug
(68) |
Sep
(93) |
Oct
(53) |
Nov
(95) |
Dec
(69) |
2009 |
Jan
(81) |
Feb
(162) |
Mar
(215) |
Apr
(216) |
May
(78) |
Jun
(131) |
Jul
(61) |
Aug
(176) |
Sep
(127) |
Oct
(28) |
Nov
(83) |
Dec
(94) |
2010 |
Jan
(100) |
Feb
(187) |
Mar
(320) |
Apr
(161) |
May
(194) |
Jun
(142) |
Jul
(129) |
Aug
(139) |
Sep
(239) |
Oct
(202) |
Nov
(139) |
Dec
(196) |
2011 |
Jan
(195) |
Feb
(191) |
Mar
(201) |
Apr
(127) |
May
(84) |
Jun
(126) |
Jul
(101) |
Aug
(237) |
Sep
(123) |
Oct
(104) |
Nov
(197) |
Dec
(114) |
2012 |
Jan
(65) |
Feb
(85) |
Mar
(129) |
Apr
(84) |
May
(94) |
Jun
(83) |
Jul
(89) |
Aug
(85) |
Sep
(89) |
Oct
(73) |
Nov
(34) |
Dec
(38) |
2013 |
Jan
(89) |
Feb
(30) |
Mar
(25) |
Apr
(18) |
May
(20) |
Jun
(45) |
Jul
(74) |
Aug
(37) |
Sep
(72) |
Oct
(30) |
Nov
(67) |
Dec
(24) |
2014 |
Jan
(23) |
Feb
(16) |
Mar
(40) |
Apr
(37) |
May
(12) |
Jun
(18) |
Jul
(30) |
Aug
(26) |
Sep
(24) |
Oct
(32) |
Nov
(15) |
Dec
(33) |
2015 |
Jan
(15) |
Feb
(45) |
Mar
(21) |
Apr
(24) |
May
(22) |
Jun
(7) |
Jul
(57) |
Aug
(17) |
Sep
(16) |
Oct
(3) |
Nov
(8) |
Dec
(13) |
2016 |
Jan
(7) |
Feb
(14) |
Mar
(40) |
Apr
(8) |
May
(10) |
Jun
(6) |
Jul
(8) |
Aug
(10) |
Sep
(19) |
Oct
(20) |
Nov
(45) |
Dec
(10) |
2017 |
Jan
(10) |
Feb
(12) |
Mar
(3) |
Apr
(17) |
May
(41) |
Jun
(21) |
Jul
(13) |
Aug
(13) |
Sep
(7) |
Oct
(23) |
Nov
(10) |
Dec
(23) |
2018 |
Jan
(45) |
Feb
(3) |
Mar
(57) |
Apr
(107) |
May
(173) |
Jun
(47) |
Jul
(28) |
Aug
(26) |
Sep
(38) |
Oct
(56) |
Nov
(22) |
Dec
(11) |
2019 |
Jan
(37) |
Feb
(8) |
Mar
(7) |
Apr
(29) |
May
(32) |
Jun
(5) |
Jul
(21) |
Aug
(31) |
Sep
(38) |
Oct
(8) |
Nov
(13) |
Dec
(10) |
2020 |
Jan
(9) |
Feb
(33) |
Mar
(14) |
Apr
(4) |
May
(16) |
Jun
(11) |
Jul
(14) |
Aug
(50) |
Sep
(24) |
Oct
(3) |
Nov
(14) |
Dec
(13) |
2021 |
Jan
(18) |
Feb
(15) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(8) |
Jul
(6) |
Aug
(7) |
Sep
(26) |
Oct
(17) |
Nov
(6) |
Dec
(2) |
2022 |
Jan
(3) |
Feb
(11) |
Mar
(7) |
Apr
(15) |
May
(5) |
Jun
(4) |
Jul
(29) |
Aug
(6) |
Sep
(7) |
Oct
|
Nov
(4) |
Dec
(1) |
2023 |
Jan
|
Feb
|
Mar
|
Apr
(10) |
May
(3) |
Jun
(5) |
Jul
(3) |
Aug
(10) |
Sep
(10) |
Oct
(7) |
Nov
(2) |
Dec
(4) |
2024 |
Jan
(22) |
Feb
(5) |
Mar
(11) |
Apr
(20) |
May
(16) |
Jun
(9) |
Jul
(14) |
Aug
(5) |
Sep
(7) |
Oct
(4) |
Nov
(3) |
Dec
|
2025 |
Jan
(6) |
Feb
(6) |
Mar
(14) |
Apr
(2) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Krishna C. <cha...@gm...> - 2019-08-20 12:44:54
|
Hi, When using MAC Address as an index ( I am using MacAddress type from SNMPv2-TC.) the output is incorrect because the length of the string is prefixed as mac address is defined as OCTET STR there is an extra byte and the last byte of mac address is interpreted as next OID. snmpwalk: HistValue."wlp8s0f0".'....B.'.hist_2.2.19 snmpwalk -OX HistValue["wlp8s0f0"][STRING: 06:00:90:e6:42:99][hist_2][2].19 In the above examples last but one OID 2 is hist_2. Is there a way to disable prefixing of length? -- Thanks, Regards, Chaitanya T K. |
From: David H. <da...@ne...> - 2019-08-09 20:35:39
|
Hi again, Should I have posted this on the net-snmp-users list instead? I pondered that originally but thought that the extra code locus information (in ifTable_data_access.c) in the original note justified its inclusion here. I'm still looking for a way to use the override mechanism for setting specific ifXEntry trap enable values and to have this work for actual generation of linkUp/linkDown traps when enabled. Is there anyone reading this list that might be able to help me with this? I forgot to mention originally that I'm using NetSNMP v5.7.3 on Linux. Thanks, -David On Wednesday, August 07, 2019 11:15 AM, David Hauck <da...@ne...> wrote: > Hi, > > I'm trying to understand the difference between using an "override" for setting the IF- > MIB::ifLinkUpDownTrapEnable.<x> object vs. a traditional set. I find that when these columns are set > for an ifXEntry via the override mechanism in the agent's configuration file I do not ever see the > corresponding effect (wrt linkUp/linkDown traps being issued): > > override -rw IF-MIB::ifLinkUpDownTrapEnable.4 integer 1 > > However, if I remove the override and instead set the MIB object via a traditional set the > corresponding effect (linkUp/linkDown traps being issued) does indeed occur: > > snmpset -v2c -c private -m ALL localhost IF-MIB::ifLinkUpDownTrapEnable.4 i 1 > > Indeed, when I step through the agent in the debugger I see the key conditional where this behaviour > changes. This is in _check_interface_entry_for_updates() in ifTable_data_access.c: > > ... > if (oper_changed) { > rowreq_ctx->data.ifLastChange = netsnmp_get_agent_uptime(); > #ifdef USING_IF_MIB_IFXTABLE_IFXTABLE_MODULE if > (rowreq_ctx->data.ifLinkUpDownTrapEnable == 1) { > if (rowreq_ctx->data.ifOperStatus == IFOPERSTATUS_UP) { ... > The 'data.ifLinkUpDownTrapEnable' data member is always 0 in the override case, however, it is > always the correct value (1 in the 'snmpset' case above) when 'snmpset' is used. Oddly, in the override > case I do see an associated get ('snmpget') return the proper override (enable) value: > > snmpget -v2c -c private -m ALL localhost IF-MIB::ifLinkUpDownTrapEnable.4 > IF-MIB::ifLinkUpDownTrapEnable.4 = INTEGER: enabled(1) > > Moreover, whenever the override is used (note the use of the '-rw' token) I do not see any of the > normal table access methods in ifXTable.c get called (i.e., no breaks in > ifLinkUpDownTrapEnable_{get|set}). Why is this? And why does this have an effect on the ultimately > relevant conditional in _check_interface_entry_for_updates()? > > My preference is to use the override mechanism so that I can persist (and ultimately prevent sets by > removing the '-rw' token) the enable/disable state. > > Thanks for any insight anyone might be able to provide. > > Regards, > -David > > _______________________________________________ Net-snmp-coders mailing list Net...@li... https://lists.sourceforge.net/lists/listinfo/net-snmp-coders |
From: David H. <da...@ne...> - 2019-08-07 18:39:02
|
Hi, I'm trying to understand the difference between using an "override" for setting the IF-MIB::ifLinkUpDownTrapEnable.<x> object vs. a traditional set. I find that when these columns are set for an ifXEntry via the override mechanism in the agent's configuration file I do not ever see the corresponding effect (wrt linkUp/linkDown traps being issued): override -rw IF-MIB::ifLinkUpDownTrapEnable.4 integer 1 However, if I remove the override and instead set the MIB object via a traditional set the corresponding effect (linkUp/linkDown traps being issued) does indeed occur: snmpset -v2c -c private -m ALL localhost IF-MIB::ifLinkUpDownTrapEnable.4 i 1 Indeed, when I step through the agent in the debugger I see the key conditional where this behaviour changes. This is in _check_interface_entry_for_updates() in ifTable_data_access.c: ... if (oper_changed) { rowreq_ctx->data.ifLastChange = netsnmp_get_agent_uptime(); #ifdef USING_IF_MIB_IFXTABLE_IFXTABLE_MODULE if (rowreq_ctx->data.ifLinkUpDownTrapEnable == 1) { if (rowreq_ctx->data.ifOperStatus == IFOPERSTATUS_UP) { ... The 'data.ifLinkUpDownTrapEnable' data member is always 0 in the override case, however, it is always the correct value (1 in the 'snmpset' case above) when 'snmpset' is used. Oddly, in the override case I do see an associated get ('snmpget') return the proper override (enable) value: snmpget -v2c -c private -m ALL localhost IF-MIB::ifLinkUpDownTrapEnable.4 IF-MIB::ifLinkUpDownTrapEnable.4 = INTEGER: enabled(1) Moreover, whenever the override is used (note the use of the '-rw' token) I do not see any of the normal table access methods in ifXTable.c get called (i.e., no breaks in ifLinkUpDownTrapEnable_{get|set}). Why is this? And why does this have an effect on the ultimately relevant conditional in _check_interface_entry_for_updates()? My preference is to use the override mechanism so that I can persist (and ultimately prevent sets by removing the '-rw' token) the enable/disable state. Thanks for any insight anyone might be able to provide. Regards, -David |
From: Wes H. <har...@us...> - 2019-08-02 22:27:20
|
Jose Roberto Fernandez Anahia <jr...@gm...> writes: > I observed that my funcion My_Get_Table(struct variable *vp, oid > *name, size_t *length, int exact, size_t *var_len, WriteMethod > **write_method) > is called much more than 5 (five) 5 times!!! The upper code doesn't know how many entries you have, so it has to call you until it gets a "nothing more" answer. And it also has no notion of whether or not new data was added to a table since the last time the mib module was queried, so even if it only counted 4 rows in the walk of the first column, it will continue to ask for more data in all the rest of the columns too (it never assumes the data hasn't changed between calls). -- Wes Hardaker Please mail all replies to net...@li... |
From: Wes H. <har...@us...> - 2019-08-02 22:25:16
|
Alireza <coc...@gm...> writes: > How can I change the COMMUNITY's string without using the config > file? > With the information I get, there is a command for this: > netsnmp_ds_set_string (NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_COMMUNITY, "public"); That sets the outgoing community, not the incoming for the agent. You might try passing it via netsnmp_config() API which lets you pass things like "rocommunity". For details on what happens underneath and doing it directly, see agent/mibgroup/mibII/vacm_conf.c -- Wes Hardaker Please mail all replies to net...@li... |
From: Wes H. <har...@us...> - 2019-08-02 22:16:23
|
Ashutosh Kumar <ash...@gm...> writes: > Hi Ryan, > > I'd recommend you to go through the implementation of apps/snmpset.c that provides > the CLI functionality. Had a similar requirement for a project I was working on > around a year ago, and going through the CLI implementation helped a lot . Agreed, and I think (additionally) if you look a the base tutorial for writing applications it's a good place to start. http://www.net-snmp.org/wiki/index.php/TUT:Simple_Application Functionally a SET is just like a GET, where you add a PDU containing varbinds. For a GET you add a varbind with a NULL in the value portion, and for a SET you simply fill it out with a real value. -- Wes Hardaker Please mail all replies to net...@li... |
From: Ashutosh K. <ash...@gm...> - 2019-08-02 18:41:54
|
Hi Ryan, I'd recommend you to go through the implementation of apps/snmpset.c <https://github.com/haad/net-snmp/blob/master/apps/snmpset.c>that provides the CLI functionality. Had a similar requirement for a project I was working on around a year ago, and going through the CLI implementation helped a lot . Thanks, Ashutosh On Fri, Aug 2, 2019 at 10:29 PM Ryan Frost <ryf...@gm...> wrote: > Good morning, > > I’m not sure if this is the right email for this but I’m in need of help > on a project. I have been using this library and am familiar with all the > CLI commands but need to put it into code. The example and read_objid > function is working and gets the status I want. Now I would like to set > this objid value to something different, is there a function similar to > read_objid that sets an OID value? If this is the wrong email could you > please point me to the right one. > > Thanks, > > Ryan Frost > _______________________________________________ > Net-snmp-coders mailing list > Net...@li... > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders > |
From: prabu v. <pra...@gm...> - 2019-07-31 13:35:47
|
Dear All, As part of my Agent Configuration, I'm planning to provide an User Interface to configure the SNMP Configuration like Read-Only Community, Read-Write Community and all including SNMPv3. Now the issue is whether the SNMP Agent and SNMP Utilities will be able to process all special characters or not. Because when I configure with the special characters `~!@#$%^&*()_+-=:;"[]{}|,.<>/? it works like a charm. But when I configure with '(single quote) or \(back slash) then the issue arises like no response with an Authentication Failure Trap. So based on this observation, can I block only these *two characters* only in the validation along with following validation? - No space allowed - No special characters in the beginning and end - Min Length should be 6 and max length should be 32 Please correct me if I'm doing wrong! *Note: *This validation is applicable for Read-Only Community, Read-Write Community, SNMPv3 User Name, Privacy Key and Authentication Password. -- With Best Regards, Anandaprabu V <https://www.linkedin.com/in/anandaprabu-v-10867671/> VVDN Technologies Pvt. Ltd <http://www.vvdntech.com/>, Chennai Cell : +91 9500650885 | Skype : prabuvaradharajan |
From: Niels B. <nb...@us...> - 2019-07-30 07:28:06
|
On Mon, Jul 29, 2019 at 03:19:56PM -0400, Ryan Frost wrote: > Good afternoon, > > I am familiar with the CLI commands and can also get OID values in code but > I need to set them in code. How do I go about doing this? I’m using > read_objid to print them similar to the example but I need to be able to > set the values in code. man read_objid? Have you looked at the source of the CLI commands for inspiration? /Niels -- Niels Baggesen - @home - Århus - Denmark - nb...@us... The purpose of computing is insight, not numbers --- R W Hamming |
From: Ryan F. <ryf...@gm...> - 2019-07-29 19:20:17
|
Good afternoon, I am familiar with the CLI commands and can also get OID values in code but I need to set them in code. How do I go about doing this? I’m using read_objid to print them similar to the example but I need to be able to set the values in code. Thanks, Ryan Frost |
From: Ryan F. <ryf...@gm...> - 2019-07-29 12:13:41
|
Good morning, I’m not sure if this is the right email for this but I’m in need of help on a project. I have been using this library and am familiar with all the CLI commands but need to put it into code. The example and read_objid function is working and gets the status I want. Now I would like to set this objid value to something different, is there a function similar to read_objid that sets an OID value? If this is the wrong email could you please point me to the right one. Thanks, Ryan Frost |
From: Bart V. A. <bva...@ac...> - 2019-07-27 01:28:46
|
Hi Bill, Commit e56699f5e2ef added the ability to set the source address with "-s" for trapsess, which is great. Do you remember in which man page that option has been documented? Thanks, Bart. |
From: Alireza <coc...@gm...> - 2019-07-26 15:58:36
|
Hello, How can I change the COMMUNITY's string without using the config file? With the information I get, there is a command for this: netsnmp_ds_set_string (NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_COMMUNITY, "public"); But that does not work! in fact, this does not make a difference My code: init_agent("SnmpD"); init_my_mib_code(); init_snmp("SnmpD"); init_master_agent(); netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID,NETSNMP_DS_AGENT_ROLE, 0); netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,NETSNMP_DS_LIB_DUMP_PACKET,true); netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID,NETSNMP_DS_AGENT_VERBOSE,true); netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,NETSNMP_DS_LIB_DONT_READ_CONFIGS,true); netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID,NETSNMP_DS_LIB_COMMUNITY,"public"); while (whatever) { agent_check_and_process(0); } |
From: Jose R. F. A. <jr...@gm...> - 2019-07-24 06:06:27
|
I made some text corrections from my first post (same subject) to better understanding of the problem I'm reporting. The system is a Raspberry PI (armv7l GNU/Linux 4.14.27). Using 5.8 (branch master) AgentX subagent with old_api style for my own MIB operation and I'm observing the following problem. I have a table in my MIB with 67 elements/objects (attributes/columns) .1.3.6.1.4.1.7585.1.1.1.5.31 There are 4 (four) entries (lines) in this table. When I call using snmpwalk, for instance, some of the 67, saying object "17" with .1.3.6.1.4.1.7585.1.1.1.5.31.1.17 snmpwalk -v 2c -c public xxx.xxx.xxx.xxx .1.3.6.1.4.1.7585.1.1.1.5.31.1.17 I receive the correct response: MY-MIB::TheElement17.1 = Gauge32: XYZ MY-MIB::TheElement17.2 = Gauge32: XYZ MY-MIB::TheElement17.3 = Gauge32: XYZ MY-MIB::TheElement17.4 = Gauge32: XYZ That is perfect ... But... I observed that my funcion My_Get_Table(struct variable *vp, oid *name, size_t *length, int exact, size_t *var_len, WriteMethod **write_method) is called much more than 5 (five) 5 times!!! Why if I have only four entries in this table? This cause an extra processing that is not absolutelly necessary. The fuction is called erroneous in this way: TheElement17.1 TheElement17.2 TheElement17.3 TheElement17.4 TheElement17.5 ---> Here my function My_Get_Table() returns NULL as result of the header_simple_table() processing return... CORRECT!!! But it continue to be called: TheElement18.1 TheElement19.1 TheElement20.1 TheElement21.1 ---> Here AGAIN my fuction My_Get_Table() returns NULL as result of the header_simple_table() processing return But My_Get_Table() continue to be called ... TheElement18.1 TheElement19.1 TheElement20.1 TheElement21.1 ---> Here AGAIN and AGAIN my fuction My_Get_Table() returns NULL as return of header_simple_table() TheElement19.1 TheElement20.1 TheElement21.1 ---> Here AGAIN AGAIN AGAIN my fuction My_Get_Table() returns NULL TheElement20.1 TheElement21.1 ---> Here AGAIN AGAIN AGAIN and AGAIN But now My_Get_Table() is no more called!!! Why My_Get_Table() do not stopped to be called after return the first NULL by header_simple_table()? This same behaviour is observed in others tables in my MIB ... with distinct numbers of "out request calls" depending the number of elements (lines) in the table and the number (position in the table) of element called. If instead of eletment 17 as in my example above, I call the element 67 (the last in the table): snmpwalk -v 2c -c public xxx.xxx.xxx.xxx .1.3.6.1.4.1.7585.1.1.1.5.31.1.67 I will observe: TheElement67.1 TheElement67.2 TheElement67.3 TheElement67.4 TheElement67.5 ---> Here my function My_Get_Table() returns NULL as result of the header_simple_table() processing return... CORRECT!!! But... \My_Get_Table() is called, trying to get element 0 (ZERO) of the next table of my MIB (yes, I have another table folowing the table I mentioned i.e. .1.3.6.1.4.1.7585.1.1.1.5.32 is also a table I tried to debug the agent_check_and_process() function call sequence until the call of the helper function that effectively calls my the function I wrote to manipulate my MIB "My_Get_table()" but I do not understand what is checked to stop my function from being called, regardless of the answer of the snmpwalk or snmpbulkwalk (the behaviour is the same) being assembled correctly. Best regards, |
From: jayshankar n. <jay...@gm...> - 2019-07-22 07:42:43
|
I can run the snmpwalk command on these ip successfully without any error. Hence ping should also work. But when i run a modified version of snmptable, i get snmp_sess_open (Unknown host error). Also this problem happens only on solaris(linux it works fine). On Sun, Jul 21, 2019 at 8:59 PM Magnus Fromreide <ma...@ly...> wrote: > On Fri, Jul 19, 2019 at 01:08:02PM +0530, jayshankar nair wrote: > > Hi, > > > > I am running modified version of snmptable.c. On certain machines > > > > i am getting snmp_sess_open error "Unknown host". > > > > Any idea??. > > Is the name lookup set up on those certain machines? I.e. does > > ping hostname-snmptable-fails-to-find > > work? > > /MF > |
From: Magnus F. <ma...@ly...> - 2019-07-21 15:29:32
|
On Fri, Jul 19, 2019 at 01:08:02PM +0530, jayshankar nair wrote: > Hi, > > I am running modified version of snmptable.c. On certain machines > > i am getting snmp_sess_open error "Unknown host". > > Any idea??. Is the name lookup set up on those certain machines? I.e. does ping hostname-snmptable-fails-to-find work? /MF |
From: jayshankar n. <jay...@gm...> - 2019-07-19 07:38:22
|
Hi, I am running modified version of snmptable.c. On certain machines i am getting snmp_sess_open error "Unknown host". Any idea??. Thanks, Jayshankar |
From: jayshankar n. <jay...@gm...> - 2019-07-15 09:04:40
|
Hi, I am running code similar to snmptrapd on linux server. Currently there are no traps receiving on the system. I am getting Time Out. Is it a valid behavior to timeout if there are no traps . while (netsnmp_running) { trapd_update_config(); numfds = 0; /* Initialize the descriptors to null set */ FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds); block = 0; tvp = &timeout; timerclear(tvp); /* Set TimeOut as 5 sec */ tvp->tv_sec = 10; tvp->tv_usec = 0; /* Setting values in absence of SNMP */ snmp_select_info(&numfds, &readfds, tvp, &block); if (block == 1) tvp = NULL; /* block without timeout */ /* Adding an external event fds to read, write, excep fds. * Returns biggest descriptor , when fd_sets ready for select(). */ netsnmp_external_event_info(&numfds, &readfds, &writefds, &exceptfds); /* Checking File Descriptor to Read */ /* Call to select with return value from snmp_select_info */ count = select(numfds, &readfds, &writefds, &exceptfds, tvp); gettimeofday(&Now, 0); /* IF found descriptor */ if (count > 0) { netsnmp_dispatch_external_events(&count, &readfds, &writefds, &exceptfds); /* If there any more events after external events then try SNMP events */ if (count > 0) { /*Reads each snmp socket that has inputs*/ snmp_read(&readfds); } } else switch (count) { /* Cases depending number of descriptor */ case 0: print ----> spLogErr("\n TIME OUT"); snmp_timeout(); break; case -1: spLogErr("\n Error at Select for Descriptor"); if (errno == EINTR) continue; snmp_log_perror("select"); netsnmp_running = 0; break; default: spLogErr("\n %s::%d Default Running", __FUNCTION__, __LINE__); fprintf(stderr, "select returned %d\n", count); netsnmp_running = 0; } Thanks & Regards Jayshankar |
From: YANG K. <Kai...@hs...> - 2019-07-15 03:06:12
|
Hi, we use snmp 5.7.3, using V3, authProtocol SHA, privProtocol AES. Sometimes the agent will be crash, the stack as flow. Where there has some idea about it? Thanks a lot. #0 0x0000ffffafac7168 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x0000ffffafac855c in __GI_abort () at abort.c:89 #2 0x0000ffffafafe178 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0xffffafbac7f0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x0000ffffafb03cf8 in malloc_printerr (action=3, str=0xffffafbac8f8 "double free or corruption (out)", ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5004 #4 0x0000ffffafb04568 in _int_free (av=0xffffafbd49a0 <main_arena>, p=0xffff90007e30, have_lock=0) at malloc.c:3865 #5 0x0000ffffafdbb6b8 in snmp_free_pdu () from /ptnapp/Active/lib/libnetsnmp.so.30 #6 0x0000ffffafdbebe4 in snmp_sess_timeout () from /ptnapp/Active/lib/libnetsnmp.so.30 #7 0x0000ffffafdbe318 in snmp_timeout () from /ptnapp/Active/lib/libnetsnmp.so.30 #8 0x0000ffffafebb63c in agent_check_and_process () from /ptnapp/Active/lib/libnetsnmpagent.so.30 br. kaigeny |
From: Jose R. F. A. <jr...@gm...> - 2019-07-11 20:49:23
|
Hello Net-SNMP fellows. Using 5.8 I'm observing the following "problem" I have a table in my MIB with 67 elements/objects (attributes) .1.3.6.1.4.1.7585.1.1.1.5.31.1 There are 4 (four) entries in this table. When I call with snmpwalk for instance some of the 67 saying object 17 with .1.3.6.1.4.1.7585.1.1.1.5.31.1.17 snmpwalk -v 2c -c public xxx.xxx.xxx.xxx .1.3.6.1.4.1.7585.1.1.1.5.31.1.17 I receive the correct response: MY-MIB::TheElement17.1 = Gauge32: XYZ MY-MIB::TheElement17.2 = Gauge32: XYZ MY-MIB::TheElement17.3 = Gauge32: XYZ MY-MIB::TheElement17.4 = Gauge32: XYZ Thayt is perfect ... I'm using the old_api style with function My_Get_Table(struct variable *vp, oid *name, size_t *length, int exact, size_t *var_len, WriteMethod **write_method) Debugging this fuction I observed that its is called more than 5 times!!! This cause an extra processing that is not absolutelly necessary. The fuction is called in this way: TheElement17.1 TheElement17.2 TheElement17.3 TheElement17.4 TheElement17.5 ---> Here my function My_Get_Table() returns NULL as return of header_simple_table() ... CORRECT!!! But conitnues to be called: TheElement18.1 TheElement19.1 TheElement20.1 TheElement21.1 ---> Here AGAIN my fuction My_Get_Table() returns NULL as return of header_simple_table() But My_Get_Table() still been called ... TheElement18.1 TheElement19.1 TheElement20.1 TheElement21.1 ---> Here AGAIN AAIN my fuction My_Get_Table() returns NULL as return of header_simple_table() But My_Get_Table() still been called ... TheElement19.1 TheElement20.1 TheElement21.1 ---> Here AGAIN AAIN AGAIN my fuction My_Get_Table() returns NULL as return of header_simple_table() But My_Get_Table() still been called ... TheElement20.1 TheElement21.1 ---> Here AGAIN AAIN AGAIN and AGAIN my fuction My_Get_Table() returns NULL as return of header_simple_table() NOW stop!!! Is this normal behaviour for snmpwalk and snmpbulkwalk? Why My_Get_Table() do not stopped to be called after return the first NULL by header_simple_table()? This same behaviour is observed in others tables in my MIB ... with distinct numbers of "out request calls" depending the number of elements in the table and the number of element called. If instead of eletment 17 as in my example above, I call the element 67 (the last in the same table): snmpwalk -v 2c -c public xxx.xxx.xxx.xxx .1.3.6.1.4.1.7585.1.1.1.5.31.1.67 I will observe: TheElement67.1 TheElement67.2 TheElement67.3 TheElement67.4 TheElement67.5 ---> Here my function My_Get_Table() returns NULL as return of header_simple_table() ... CORRECT!!! I trying to get element 0 (ZERO) of the next table of my MIB (yes I have one folowing the table I mentioned i.e. .1.3.6.1.4.1.7585.1.1.1.5.31.1.18 is also a table I tried to debug the agent_check_and_process(1) function call sequence until to call the helper function that effectively calls my get_table function but I decided to get some help to be more effective to solve this issue. What I’m doing wrong? Best regards, |
From: Bart V. A. <bva...@ac...> - 2019-07-11 01:17:32
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body text="#000000" bgcolor="#FFFFFF"> <div class="moz-cite-prefix">On 7/10/19 9:49 AM, Bill Fenner wrote:<br> </div> <blockquote type="cite" cite="mid:CAF4SogbErGggyn1HXxTn9M7Gk+qitMOS_p=n0B...@ma..."> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <div dir="ltr"> <div dir="ltr">On Mon, Jul 8, 2019 at 9:53 AM Bart Van Assche <<a href="mailto:bva...@ac..." moz-do-not-send="true">bva...@ac...</a>> wrote:<br> </div> <div class="gmail_quote"> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div bgcolor="#FFFFFF"> <div class="gmail-m_-8864571604058372344moz-cite-prefix">Hi Bill,</div> <div class="gmail-m_-8864571604058372344moz-cite-prefix"><br> </div> <div class="gmail-m_-8864571604058372344moz-cite-prefix">To avoid confusion: does your comment apply to commit a88d81f1144e ("NET-SNMP-SYSTEM-MIB, Linux: Update calculation of free space") only or also to commit 4e3ace87b566 ("NET-SNMP-SYSTEM-MIB: Account reclaimable space")?</div> </div> </blockquote> <div><br> </div> <div> I'm fine with 4e3ace87b566 ("NET-SNMP-SYSTEM-MIB: Account reclaimable space"). It's change a88d81f1144e ("NET-SNMP-SYSTEM-MIB, Linux: Update calculation of free space") that I'm concerned about, that changes the long-standing values reported.</div> </div> </div> </blockquote> <p>Hi Bill,</p> <p>Commit a88d81f1144e has been reverted on the v5.8 and master branches.</p> <p>Bart.<br> </p> </body> </html> |
From: Bill F. <fe...@us...> - 2019-07-10 16:49:37
|
On Mon, Jul 8, 2019 at 9:53 AM Bart Van Assche <bva...@ac...> wrote: > Hi Bill, > > To avoid confusion: does your comment apply to commit a88d81f1144e > ("NET-SNMP-SYSTEM-MIB, Linux: Update calculation of free space") only or > also to commit 4e3ace87b566 ("NET-SNMP-SYSTEM-MIB: Account reclaimable > space")? > I'm fine with 4e3ace87b566 ("NET-SNMP-SYSTEM-MIB: Account reclaimable space"). It's change a88d81f1144e ("NET-SNMP-SYSTEM-MIB, Linux: Update calculation of free space") that I'm concerned about, that changes the long-standing values reported. Bill > > On 7/8/19 5:18 AM, Bill Fenner via Net-snmp-coders wrote: > > There's a long history of telling people "You're polling a Linux system, > you have to know that you subtract buffers and cached from physical before > you report free memory" in the HOST-RESOURCES-MIB. I'm not against > simplifying, but - if people have data collection set up for "the old way", > where you have to subtract buffers and cached after collecting them, then > this change will result in double-subtraction. > > In Arista EOS we handled this by adding another row to the table, to avoid > breaking existing data collection when someone upgrades. > > Bill > > > On Mon, Jul 8, 2019 at 12:27 AM net-snmp Git repository < > no...@co...> wrote: > >> Branch: V5-8-patches >> >> NET-SNMP-SYSTEM-MIB, Linux: Update calculation of free space >> >> Update calculation of free space for Physical and Virtual memory on linux. >> Based on >> https://gitlab.com/procps-ng/procps/blob/master/proc/sysinfo.c#L789 >> >> [ bvanassche: edited patch subject ] >> >> By Josef Ridky on 07/04/2019 06:45 >> *View Changes* >> <https://sourceforge.net/p/net-snmp/code/ci/a88d81f1144ecf33f0ca02ada042b77368855a94/> >> ------------------------------ >> Branch: master >> >> Merge branch 'V5-8-patches' >> >> * V5-8-patches: >> NET-SNMP-SYSTEM-MIB, Linux: Update calculation of free space >> >> By Bart Van Assche on 07/08/2019 04:15 >> *View Changes* >> <https://sourceforge.net/p/net-snmp/code/ci/8d5cdf8aeb6b3521e09b2f2a921ed5061da221e9/> >> ------------------------------ >> >> Sent from sourceforge.net because you indicated interest in >> https://sourceforge.net/p/net-snmp/code/ >> >> To unsubscribe from further messages, please visit >> https://sourceforge.net/auth/subscriptions/ >> > > |
From: jayshankar n. <jay...@gm...> - 2019-07-09 12:22:05
|
Hi, I am facing some issues with snmptrapd. snmptrapd is missing some isis traps. If there are 4 isis traps in tcpdump at certain time. snmptrapd shows only 3 isis traps. This could be happening for other trap types too. How can i fix this issue. Thanks, Jayshankar |
From: Surya T S. <sur...@gm...> - 2019-07-09 07:29:45
|
Hi, If I do snmpv3 walk with context, i am getting now only mibs registered with the specific context. say context can be mapped to either vrf/protocol instances. All instances of mib objects running on specfic context are only getting displayed I want to give access to entire oids + context specific oid instances on snmp walk. For eg: BGP OSPF runs per context, and on snmpv3 walk with context, all instances of BGP or OSPF specific to particular context can only be accessed. System table etc. are not context specific and cannot be accessed on snmpv3 walk with context. I need to provide access to entire oid + BGP/OSPF(context specific instances) on snmpv3 walk with any context. Is there any modifications that can be done in snmpd.conf file to provide entire mib access + context view access on snmpv3 walk with context. Please provide your valuable suggestions. I am in urgent need of suggestions. Thanks in advance. |
From: Sam T. <sta...@cu...> - 2019-07-09 01:57:23
|
Hello, Can we just add something like AGENTX_MSG_FLAG_DISCONNECT_IN_PROGRESS in close_agents_session() ? sesssion->subsession->flags = AGENTX_MSG_FLAG_DISCONNECT_IN_PROGRESS; So that later in agentx_master_handler() we can check ax_session->subsession->flags so we can check this: if (!(ax_session->subsession->flags & AGENTX_MSG_FLAG_DISCONNECT_IN_PROGRESS)) { cb_data = NULL; } And we do not have the double free at the end. Thanks, Sam On Wed, Jun 26, 2019 at 2:42 PM Sam Tannous <sta...@cu...> wrote: > Bill, Bart, > > Shouldn't there be a check (netsnmp_handler_check_cache) > just before snmp_async_send to make sure the cb_data is still > valid (or that the session hasn't been disconnected)? > > I'm assuming (with good evidence) that our subagent > session was disconnected (our subagent has a problem) > and something was freed...and we attempt to free cb_data > again and core dump. So at the bottom of agentx_got_response(): > > > /* > * When the master sends a CleanupSet PDU, it will never get a response > * back from the subagent. So we shouldn't allocate the > * netsnmp_delegated_cache structure in this case. > */ > if (pdu->command != AGENTX_MSG_CLEANUPSET) > cb_data = netsnmp_create_delegated_cache(handler, reginfo, > reqinfo, requests, > (void *) ax_session); > else > cb_data = NULL; > > > */* some checks */* > > > > > > > > > * cache = netsnmp_handler_check_cache(cb_data); if (!cache) { > DEBUGMSGTL(("agentx/master", "session may be disconnected %8p\n", > session)); /* response is too late, perhaps session was > disconnected? */ if (cb_data) > netsnmp_free_delegated_cache((netsnmp_delegated_cache*) magic); > return 1; }* > */* end checks */* > > /* > * send the requests out. > */ > DEBUGMSGTL(("agentx/master", "sending pdu > (req=0x%x,trans=0x%x,sess=0x%x)\n", > (unsigned)pdu->reqid, (unsigned)pdu->transid, > (unsigned)pdu->sessid)); > > result = snmp_async_send(ax_session, pdu, agentx_got_response, cb_data); > if (result == 0) { > snmp_free_pdu(pdu); > if (cb_data) > netsnmp_free_delegated_cache((netsnmp_delegated_cache*) > cb_data); > } > > return SNMP_ERR_NOERROR; > > --Sam > > On Tue, Jun 25, 2019 at 3:38 PM Sam Tannous <sta...@cu...> > wrote: > >> >> I'm still not able to recreate this bug (#2943) where we >> double free cb_data at the bottom of agentx_master_handler() >> (with the netsnmp_free_delegated_cache()). >> >> Just in looking at the code logic, it seems like we allocate >> the netsnmp_delegated_cache structure only if the master >> sent a CleanupSet PDU. In the case I'm looking at, I can >> see the master has already disconnected the subagent: >> >> bgpd[5180]: snmp[info]: AgentX master disconnected us, reconnecting in 15 >> ip[8042]: *** Error in `/usr/sbin/snmpd': double free or corruption >> (fasttop): 0x0000000001d15420 *** >> zebra[21794]: snmp[info]: AgentX master disconnected us, reconnecting in >> 15 >> >> So when this happens, the master attempts to close_agentx_session(). >> My best guess (without being able to recreate this) is that this structure >> is freed here first. Is it possible to somehow protect the session >> (and all subsessions) from being freed if there the master is in the >> process >> of allocating netsnmp_delegated_cache? >> >> Can we set something like AGENTX_MSG_CLEANUPSET if we have >> disconnected (or timed out) any/all subagents? This is just to prevent >> the >> double free that happens at the end of agentx_master_handler(). >> >> Thanks, >> Sam >> >> >> >> > > -- *Sam Tannous* Engineering Cumulus Networks® +1 650 383 6700 x 1106 <http://www.cumulusnetworks,com>www.cumulusnetworks.com Evaluate Cumulus® Linux® https://cumulusnetworks.com/product/secure/evaluate/ Become a Partner http://cumulusnetworks.com/partners/become-a-partner/ |