atom feed14 messages in net.java.dev.opendmk.usersRe: starting a standalone snmp agent
FromSent OnAttachments
Lucio CruscaFeb 10, 2011 9:03 am 
Daniel FuchsFeb 10, 2011 9:22 am 
Lucio CruscaFeb 11, 2011 6:49 am 
Daniel FuchsFeb 11, 2011 7:04 am 
Lucio CruscaFeb 11, 2011 8:20 am 
Lucio CruscaFeb 15, 2011 8:48 am 
Daniel FuchsFeb 20, 2011 6:10 am 
Lucio CruscaFeb 21, 2011 8:17 am 
Daniel FuchsFeb 21, 2011 9:28 am 
Lucio CruscaFeb 22, 2011 7:02 am 
Daniel FuchsFeb 22, 2011 9:07 am 
Lucio CruscaMar 31, 2011 9:17 am 
Daniel FuchsMar 31, 2011 9:39 am 
Daniel FuchsMar 31, 2011 9:53 am 
Subject:Re: starting a standalone snmp agent
From:Daniel Fuchs (dani@oracle.com)
Date:Mar 31, 2011 9:53:49 am
List:net.java.dev.opendmk.users

On 3/31/11 6:18 PM, Lucio Crusca wrote:

but, besides the fact mibgen did not generate any *myMibName*Info.java

The 'Info' comes directly from the mib shown there: http://techdive.in/snmp/snmp-agent-using-jdmk-api

testMgtMIBInfo OBJECT IDENTIFIER ::= { test-mib 1 }

appVersion OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Sytem Version" ::= { testMgtMIBInfo 2 }

'appVersion' here is a scalar object (= a leaf in the OID tree) which makes the node just above it ('testMgtMIBInfo') a group. So mibgen will generate a TestMgtMIBInfo.java file, which will be a bean containing a variable for each scalar object registered directly under testMgtMIBInfo.

The name of the generated classes are directly derived from the content of the MIB file, so if you have other mib files, you will get classes with other names...

in my

case, and besides the fact I don't know what a SNMP group even is

There is not really any notion of 'group' in SNMP RFCs, although it is a widely used terminology to designate the set of scalar objects directly registered under the same radical. We use it in JDMK as a convenient way to group several properties inside the same bean.

(see http://blogs.sun.com/jmxetc/entry/understanding_the_structure_of_management for more details on scalar (= contained in groups) vs columnar (= contained in tables) objects...

hope this helps,

-- daniel

(but here

RTFM is the obvious answer), I wonder if I can solve the problem in a faster way. In my case I just need to simulate a real snmp agent, using static values read from a file. The file is the output of snmpwalk run against the real agent. So I wonder if I could just use snmpset to inject the values in my java agent simulator, leaving it as it is now (only the mibgen generated classes).

I obviously already tried that, but it succeeds only for a subset of all the OIDs. Some OIDs are r/o and that's fine, but for the most part the snmpset reply is like:

.1.3.6.1.4.1.8698.1000.1.4.1.1.2.2.3.109.99.109.14 s "mcm" Error in packet. Reason: noAccess Failed object: iso.3.6.1.4.1.8698.1000.1.4.1.1.2.2.3.109.99.109.14

Does that suggest anything to you, snmp expterts?