Exposing run info with JMX

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Exposing run info with JMX

Esteban Sancho-2
Hi folks,

I've already written a MBean to expose the number of active threads
(virtual users) but had little luck finding a hook to register this MBean
during startup. The only way I found so far to register the bean properly
and obtain the right info from JMeterContextService was in a sampler but
it's not exactly what we're looking for.

We need this MBean to run in all slaves for a remote monitoring console to
be able to correlate client and server resource consumption with the
number of active users. The sampler approach seems to fail short here.

Other option we've tried was to create a wrapper for MainDriver to
register the MBean before or after main() execution but had problems with
the dynamic class loader used by JMeter.

The perfect solution would be some kind of simple plugin (non-gui) invoked
during JMeter startup. Is there any way to do this currently? If not,
could you please point me in the right direction to implement it?

Thanks,

Esteban



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Exposing run info with JMX

sebb-2-2
On 06/11/2009, Esteban Sancho <[hidden email]> wrote:

> Hi folks,
>
>  I've already written a MBean to expose the number of active threads
>  (virtual users) but had little luck finding a hook to register this MBean
>  during startup. The only way I found so far to register the bean properly
>  and obtain the right info from JMeterContextService was in a sampler but
>  it's not exactly what we're looking for.
>
>  We need this MBean to run in all slaves for a remote monitoring console to
>  be able to correlate client and server resource consumption with the
>  number of active users. The sampler approach seems to fail short here.
>
>  Other option we've tried was to create a wrapper for MainDriver to
>  register the MBean before or after main() execution but had problems with
>  the dynamic class loader used by JMeter.
>
>  The perfect solution would be some kind of simple plugin (non-gui) invoked
>  during JMeter startup. Is there any way to do this currently? If not,
>  could you please point me in the right direction to implement it?

You can define the property

beanshell.init.file=<beanshell script file>

which will invoke a BeanShell script at startup, and use the script to
call your code.

Or you could create e.g. a Config test element, and implement the
TestListener interface (or even just use a static block).

>  Thanks,
>
>  Esteban
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [hidden email]
>  For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Exposing run info with JMX

Esteban Sancho-2
Hi sebb,

The beanshell.init.file approach worked like a charm.

Thanks!

Esteban

-----Original Message-----
From: sebb [mailto:[hidden email]]
Sent: Sábado, 07 de Noviembre de 2009 11:55 a.m.
To: JMeter Developers List
Subject: Re: Exposing run info with JMX

On 06/11/2009, Esteban Sancho <[hidden email]> wrote:
> Hi folks,
>
>  I've already written a MBean to expose the number of active threads
>  (virtual users) but had little luck finding a hook to register this
MBean
>  during startup. The only way I found so far to register the bean
properly
>  and obtain the right info from JMeterContextService was in a sampler
but
>  it's not exactly what we're looking for.
>
>  We need this MBean to run in all slaves for a remote monitoring console
to
>  be able to correlate client and server resource consumption with the
>  number of active users. The sampler approach seems to fail short here.
>
>  Other option we've tried was to create a wrapper for MainDriver to
>  register the MBean before or after main() execution but had problems
with
>  the dynamic class loader used by JMeter.
>
>  The perfect solution would be some kind of simple plugin (non-gui)
invoked
>  during JMeter startup. Is there any way to do this currently? If not,
>  could you please point me in the right direction to implement it?

You can define the property

beanshell.init.file=<beanshell script file>

which will invoke a BeanShell script at startup, and use the script to
call your code.

Or you could create e.g. a Config test element, and implement the
TestListener interface (or even just use a static block).

>  Thanks,
>
>  Esteban
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [hidden email]
>  For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]