[collectd] JVM statistics collection?

Florian Forster octo at verplant.org
Fri Sep 26 17:40:24 CEST 2008

Hi Justo,

On Fri, Sep 26, 2008 at 02:20:35PM +0200, Justo Alonso wrote:
> 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 ??

I'll gladly help, but I have no clue about Java stuff, so you may need
to help me there ;)

If present, we use a *-config script or `pkg-config' to determine the
location, flags and libs for a library. The `CURL' library provides
both, for example:
-- 8< --
 octo at huhu:~ $ curl-config --libs
 -L/usr/lib -lcurl -L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5support -lresolv -lidn -ldl -lgnutls -lz
 octo at huhu:~ $ pkg-config --libs libcurl
 -lcurl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5support -lresolv -lidn -ldl -lgnutls -lz
-- >8 --

The first step would be to find out if such a script or pkg-config file
exists for the Java interface you're using. Checking for such files can
possibly done like this:
 $ find $JAVA_HOME -name '*-config' -or -name '*.pc'

To check for the existence of the library, I'd need the name of one
`symbol' that's exported by the library. A `symbol' is basically every
function that's implemented in the library. Just pick *the central
function* the library provides, that'll do..

Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080926/05b4c9b9/attachment.pgp 

More information about the collectd mailing list