Update:
Checked the value returned from netsnmp_register_scalar_group
The first scalar group I tried to register got value 0(MIB_REGISTERED_OK).
All the others got value -1(MIB_REGISTRATION_FAILED or
MIB_DUPLICATE_REGISTRATION).
I have checked all scalars that was registered and there was no duplicate on
either name or oid.
So what could the cause be for this failure to register my scalars?
Anyway, trying to snmpget the one scalar that got OK still returned "No Such
Object available on this agent at this OID".
I even tried registering all scalars one by one, instead of in groups.
/Sverre
----- Original Message -----
Fra: "Sverre Moe" <sve...@spacetec.no>
Til: "net-snmp-users" <net-snmp-users@lists.sourceforge.net>
Sendt: 26. oktober 2012 10:19:24
Emne: Debugging SNMP
Hello, me again. Have been sending a few messages lately. Hope I am not nagging
to much.
Is there a way I could debug snmp. I have gotten my C++ program to work as an
SNMP AgentX. I have managed to register 3 hard coded test scalars and it works
when I snmpget on those scalars.
Thus removing these hard coded scalars I then try to add my own scalars.
const char *buffy = group_name.c_str();
netsnmp_register_scalar_group(
netsnmp_create_handler_registration(buffy,
handle_snmp,
group_oid,
OID_LENGTH(group_oid),
HANDLER_CAN_RONLY
), 1, scalars_total); //up to the max number of scalars in this group
When I try to snmpget on scalars I just get:
SNMPv2-SMI::enterprises.40463.2.1.0 = No Such Object available on this agent at
this OID
I know I have a scalar group of OID 1.3.6.1.4.1.40463.2 which have 8 scalars.
After I have registered all my scalars is there a way to check if there really
is any scalars registered and which ones?
Content of net-snmp.log. This is actually alot for only one snmpget. The last 3
lines continues every few seconds.
agentx/master: transport connect on session 0x7fdf24cd7840
agentx/master: handle pdu (req=0x48a4f838,trans=0x0,sess=0x0)
agentx/master: open 0x7fdf24cd7840
agentx/master: opened 0x7fdf24cd75b0 = 57 with flags = a0
agentx/master: send response, stat 0 (req=0x48a4f838,trans=0x0,sess=0x0)
agentx_build: packet built okay
agentx/master: handle pdu (req=0x48a4f839,trans=0x0,sess=0x39)
agentx/master: in register_agentx_list
agentx/master: registered ok
agentx/master: send response, stat 0 (req=0x48a4f839,trans=0x0,sess=0x39)
agentx_build: packet built okay
Connection from UDP: [127.0.0.1]:48784->[127.0.0.1]:161
agentx/master: handle pdu (req=0x48a4f83a,trans=0x0,sess=0x39)
agentx/master: send response, stat 0 (req=0x48a4f83a,trans=0x0,sess=0x39)
agentx_build: packet built okay
agentx/master: handle pdu (req=0x48a4f83b,trans=0x0,sess=0x39)
agentx/master: send response, stat 0 (req=0x48a4f83b,trans=0x0,sess=0x39)
agentx_build: packet built okay
agentx/master: handle pdu (req=0x48a4f83c,trans=0x0,sess=0x39)
agentx/master: send response, stat 0 (req=0x48a4f83c,trans=0x0,sess=0x39)
agentx_build: packet built okay
agentx/master: handle pdu (req=0x48a4f83d,trans=0x0,sess=0x39)
agentx/master: send response, stat 0 (req=0x48a4f83d,trans=0x0,sess=0x39)
agentx_build: packet built okay
CONFIDENTIALITY
This e-mail and any attachment contain KONGSBERG information which may be
proprietary, confidential or subject to export regulations, and is only meant
for the intended recipient(s). Any disclosure, copying, distribution or use is
prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in
error, please delete it immediately from your system and notify the sender
properly.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
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
CONFIDENTIALITY
This e-mail and any attachment contain KONGSBERG information which may be
proprietary, confidential or subject to export regulations, and is only meant
for the intended recipient(s). Any disclosure, copying, distribution or use is
prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in
error, please delete it immediately from your system and notify the sender
properly.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
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