February 4, 2012

net-snmp not so extensible.

A while ago, I had a write up on using the net-snmp project’s extend configuration option to get [tag]IBRIX[/tag] user quota reports using [tag]snmp[/tag]. Back then, the number of lines was quite short as the implementation was not quite system wide.

In that implementation, I had used the extend configuration option to pass a script that will spit out the output of the ibrix_edquota command. I discovered later on that the snmpwalk command was truncating my output to 100 lines and this post reveals why.

In include/net-snmp/net-snmp-config.h file there is a hardcoded limit that is rather small for my liking.

#define MAXREADCOUNT 100 /* max times to loop reading output from execs. */

Though the code seems to suggest that this is for the exec option, it appears that this is used by the extend option as well.

I tried re-compiling the package by setting the limit to 3000. When testing with a test script that will simply produce 1000 lines, it seemed like my snmpd crashed and burned. more than once.

I gave up. for now.


Speak Your Mind

*