Re: To understand the increase in size of buffer in agentx_parse() in net-snmp-5.8
On 5/13/19 12:10 PM, Vijay, Anjali wrote: Thanks for the help. Meanwhile, I had changed the buffer size back to 1472 and it seems to be working fine like the previous version, net-snmp 5.7.3. Do you think this can cause any serious impact? Hi Anjali, I think that approach is risky. It's easy for an SNMP manager to send an snmp get, getnext or getbulk request with multiple OIDs. Even if the request fits in a 1472 byte network packet, the response may exceed that packet size. Unless if you know from beforehand what kind of requests the SNMP manager(s) will send and if you know from beforehand what the maximum string length will be, I think it's safe to use a larger buffer size. Bart. ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
RE: To understand the increase in size of buffer in agentx_parse() in net-snmp-5.8
Hi Bart, Thanks for the help. Meanwhile, I had changed the buffer size back to 1472 and it seems to be working fine like the previous version, net-snmp 5.7.3. Do you think this can cause any serious impact? Regards, Anjali Vijay From: Bart Van Assche Sent: Sunday, April 28, 2019 3:39 AM To: Vijay, Anjali ; net-snmp-coders@lists.sourceforge.net Subject: Re: To understand the increase in size of buffer in agentx_parse() in net-snmp-5.8 On 4/25/19 5:56 PM, Bart Van Assche wrote: On 4/25/19 8:00 AM, Vijay, Anjali wrote: I recently started working with net-snmp-5.8. I had a query over a change that was made to agentx_parse() in agent/mibgroup/agentx/protocol.c. I noticed that the buffer of SNMP_MAX_MSG_SIZE (1472) in net-snmp-5.7.3 has been replaced with the size 65536 in net-snmp-5.8. u_char buffer[65536]; I didn't find any clarification in the ChangeLogs for this large increase of size. Can this size be reduced? It would be of great help if anyone can clear me out on this since my application has memory constraints. Hi Anjali, I will have a look and see whether it is possible to modify the AgentX code without reducing performance and without dropping support for large AgentX packets. BTW, the following commit increased the buffer size: c09140c934eb ("CHANGES: snmpd: Increase maximum AgentX packet size to 64kB.") Hi Anjali, A candidate fix has been checked in on the v5.8 and master branches. Please verify. Bart. ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Update UCD-SNMP-MIB variable type
On Mon, May 13, 2019 at 10:08:58AM +0200, Ilya Etingof wrote: > > > The currelt 5.8 release (and unreleased 5.7 update) should already > > contain objects like memTotalRealX which are defined as > > CounterBasedGauge64 > > > > Unfortunately I don't have hardware to test it :-) > > Just in case on-line agent emulation [1] could be helpful: > > $ snmpget -v2c -c mib2dev/ucd-snmp-mib demo.snmplabs.com > UCD-SNMP-MIB::memTotalRealX.0 > UCD-SNMP-MIB::memTotalRealX.0 = Counter64: 18345168853242336474 kB > > You can have it off-line as well [2]. > > 1. http://demo.snmplabs.com > 2. http://snmplabs.com/snmpsim Well, what is interesting is if the real agent get the real value. It is about debugging the agent running on the physical hardware. /Niels -- Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net The purpose of computing is insight, not numbers --- R W Hamming ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Update UCD-SNMP-MIB variable type
> The currelt 5.8 release (and unreleased 5.7 update) should already > contain objects like memTotalRealX which are defined as > CounterBasedGauge64 > > Unfortunately I don't have hardware to test it :-) Just in case on-line agent emulation [1] could be helpful: $ snmpget -v2c -c mib2dev/ucd-snmp-mib demo.snmplabs.com UCD-SNMP-MIB::memTotalRealX.0 UCD-SNMP-MIB::memTotalRealX.0 = Counter64: 18345168853242336474 kB You can have it off-line as well [2]. 1. http://demo.snmplabs.com 2. http://snmplabs.com/snmpsim ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Update UCD-SNMP-MIB variable type
On Mon, May 13, 2019 at 02:56:46AM -0400, Josef Ridky wrote: > Hi folks, > > I would like to know your opinion on following issue. > > UCD-SNMP-MIB [1] uses INTEGER32 instead of COUNTER64 for memory OIDs which > limits the reporting to 2 TiB (using KiB as the base). > Large modern servers often contain more than 2 TiB of memory leading to the > OIDs rolling over and reporting negative values. > > How can it be solved? > Can we just change the variable type? (I don't think so) > Or can we add new variables, that will be COUNTER64 type? > Or can the base be set to e.g. MiB instead of KiB in configuration? The currelt 5.8 release (and unreleased 5.7 update) should already contain objects like memTotalRealX which are defined as CounterBasedGauge64 Unfortunately I don't have hardware to test it :-) /Niels -- Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net The purpose of computing is insight, not numbers --- R W Hamming ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Update UCD-SNMP-MIB variable type
Hi folks, I would like to know your opinion on following issue. UCD-SNMP-MIB [1] uses INTEGER32 instead of COUNTER64 for memory OIDs which limits the reporting to 2 TiB (using KiB as the base). Large modern servers often contain more than 2 TiB of memory leading to the OIDs rolling over and reporting negative values. How can it be solved? Can we just change the variable type? (I don't think so) Or can we add new variables, that will be COUNTER64 type? Or can the base be set to e.g. MiB instead of KiB in configuration? [1] http://www.net-snmp.org/docs/mibs/ucdavis.html Regards Josef Ridky Software Engineer Core Services Team Red Hat Czech, s.r.o. ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders