[collectd] JVM statistics collection?

Justo Alonso justo.alonso at gmail.com
Fri Sep 26 14:20:35 CEST 2008

Hi !
   I'm working on the jmx plugin. At this moment I have a semi-operational
plugin that check memory and threads of jvm.

   The plugin work in this form:

On init
1.- Start a JVM with JNI interface.
2.- For every host configuration, create a new java object
3.- For each data in every host, we add JMXCollectdData object to this

On read
1.- For each host, we call the collect method of the JMXCollectdconnector
object of this host (this call all the collect methos of the datas).

JMXCollectdData is a java interface class, we can create class that
implements its. I make JMXCollectMemoryData and JMXCollectdThreadData to get
this stats.

At this moment, I have problems to detect the java virtual machine and all
includes and libs in the configure.in file .... the include and libs
directory depends on platform and type of virtual machine
($JAVA_HOME/jre/lib/i386/client/libjvm.so or
$JAVA_HOME/jre/lib/i386/server/libjvm.so for libs and
$JAVA_HOME/jre/include/jni.h and $JAVA_HOME/jre/include/linux/jni_md.h).
Anyone can help me ??

check exceptions and error control
check if it's thread-safe
document it !

I hope that next week could send a patch


On Thu, Sep 11, 2008 at 6:34 PM, Florian Forster <octo at verplant.org> wrote:

> Hi Justo,
> unless you specified Steve in the BCC field, he didn't get your mail.
> Please use the `group reply' or `reply to all' feature of your mail
> client when answering to mails of the mailing list. That way the mail
> will be send to the original author and everybody in the CC field
> (including the list).
> I've attached your complete mail as reference for Steve.
> Regards,
> -octo
> On Thu, Sep 11, 2008 at 11:27:41AM +0200, Justo Alonso wrote:
> > Hi !
> >
> >   I'm working on a JNI-JMX plugin. It's work as snmp plugin ... you
> define
> > instances (a jvm with jmx on) and for each instance the beans that
> collectd
> > will pull it.
> >
> >   On start collectd, we up one jni connection, and foreach instance, we
> > create a new java JMXConnector (with the instance parameters). On pull,
> > foreach instance, we call the JMXConnector get method and pass it to
> > collectd.
> >
> >  I hope to send to the list a alpha-alpha version in two weeks.
> >
> > thanks in advance, and sorry for me english
> >
> > justo
> --
> Florian octo Forster
> Hacker in training
> GnuPG: 0x91523C3D
> http://verplant.org/
> Version: GnuPG v1.4.6 (GNU/Linux)
> iD8DBQFIyUh4Hdggu3Q05IYRAum3AJ9CLBrkFNycnQIwKLc+ncI68+DHJwCfZvzs
> =LG1t
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.verplant.org/pipermail/collectd/attachments/20080926/2f7226ea/attachment.htm 

More information about the collectd mailing list