[SNMP4J] SNMP & JMX - Arrays

david pocivalnik dp.desoma at gmail.com
Thu Feb 21 18:45:38 CET 2013


Hi Frank,

thanks for the hints, but I guess you meant *oidJvmRTInputArgsEntry* ? I 
did mine as this one, and the agent starts, but I can't find a command 
to print the values, neither in Java (with TableUtils) nor with 
snmptable. Even when I start your JMX example and execute e.g.

$ snmptable dp -Ch .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1

I get the following response:

Was that a table? iso.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1

Is there something wrong with the command?

Anyhow, as I get the same response for my simple implementation I'm 
positive that the issue with Arrays is fixed. But I'd just need to 
verify with some output :)

BR
David

On 2/20/2013 11:15 PM, Frank Fock wrote:
> Hi David,
>
> The SEQUENCE type is a SNMP table with a single column which can
> be also the index at the same time (alterantively an unsigned integer can
> be used as index too).
> SNMP4J-JMX provides a mapping exactly for that. An example is the
> jvmMemManagerName SMI object which is mapped to the
> java.management.MemoryManagerMXBean.
>
> Thus, the answer is:
> 1. Yes, it is supported by SNMP4J-AgentJMX.
> 2. Yes, a SNMP MIB can specify a valid construct to map a SEQUENCE MBean.
>
> Best regards,
> Frank
>
> Am 20.02.2013 15:03, schrieb david pocivalnik:
>> Hi,
>>
>> I was looking for a way to get an attribute that is of the type String[]
>> when I realized that snmp4j is missing a representation for the type
>> SEQUENCE. I'm just curious b/c I couldn't find anything why this is not
>> implemented, or either if it was dropped from the spec.
>>
>> But as I saw in your example MibInst in snmp4j-agent-jmx you also
>> "ignored" the attribute *MemoryManagerNames* in
>> java.lang:type=MemoryPool;name=* which would be of type String[]
>>
>> thus my question, is this not supported yet by snmp4j, or is there no
>> support in snmp at all?
>>
>> Thanks and BR
>> David
>> _______________________________________________
>> SNMP4J mailing list
>> SNMP4J at agentpp.org
>> http://lists.agentpp.org/mailman/listinfo/snmp4j
>




More information about the SNMP4J mailing list