Hi,
     Finally I was able to fix this issue. Lessons learnt are

1.       We cannot override hrSystemNumusers alone as the NetSNMP does the MIB 
registration for the entire hrSystem scalar group, so we should make the master 
agent not to respond the hrSystem as a whole

2.       So I had to patch the code to comment the hrSystem registration in 
hr_system.c

3.       We cannot comment the init_hrSystem() in mib_modules_inits.h as this 
file is auto generated. So we can only comment the body of the function call 
init_hrSystem().


Thanks and Regards,
Malathi

From: Malathi Panyam [mailto:[email protected]]
Sent: Wednesday, May 18, 2011 1:52 PM
To: [email protected]
Subject: RE: Overriding the NetSNMP default implementation of Standard MIBs

Hi,
    I still have no luck in making this work, how can I override the default 
implementation of "hrSystemNumUsers"?

I tried to add the following line to snmpd.default
OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid -x unix:/var/agentx/master 
-I-ifTable -I-ifXTable -I-hrSystemNumUsers"

It did not work for me, ifTable and ifXTable override works fine though.

Pl suggest.

Thanks,
Malathi


From: Malathi Panyam [mailto:[email protected]]
Sent: Tuesday, May 10, 2011 2:06 PM
To: [email protected]
Subject: Overriding the NetSNMP default implementation of Standard MIBs

Hi,
       I am aware that we can override the NetSNMP default implementation of 
the standard MIBs with our own implementation, I have been able to do that for 
ifTable and ifXTable.

Somehow when I tried to do the same for the Host Resource MIB, specifically 
"hrSystemNumUsers" , by adding  "-I-hrSystemNumUsers" to the "snmpd.default" 
and generate the code for that attribute using mib2c, I still don't see my 
overridden implementation getting called. Am I missing anything here?

We are using NetSNMP 5.4.2.1 in OpenWRT environment.

Thanks in advance.

Regards,
Malathi
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
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

Reply via email to