L.S.,

You can use JMX to connect to the machines using the standard API in
the JDK - I created https://gist.github.com/gertv/5601849 to show you
how to set up the connection that way.

However, I would recommend you to take a look at Jolokia instead...
It's very lightweight and be be installed in Apache ServiceMix with
this command:
  osgi:install -s mvn:org.jolokia/jolokia-osgi/1.1.1

Once that bundle is installed, you can do HTTP requests like
http://localhost:8181/jolokia/read/java.lang:type=Memory/HeapMemoryUsage
to access information available through JMX.  Because it's just JSON
over HTTP, you should be able to use any programming or scripting
language to collect the information you need.


Regards,

Gert Vanthienen


On Fri, May 17, 2013 at 8:26 PM, kunalsuri <[email protected]> wrote:
> Is it possible to get the server load information of a webserver deployed on
> a ServiceMix 4. (I am also working on Fuse ESB..  I feel its same! Isn't
> it?)
>
> I dont want to use Jconsole but get the information by running a java file
> and writing the values into text file. (My project requirement!)
>
> Could someone point me to some open code online that I can run on my
> machine?
>
> I am not a hard core java developer and was working on Mainframes before but
> now need to work on a test project on webservers in java . Thus, I have
> never worked on JMX before or most of the java technologies much.
>
> Please treat me as a amateur and point me to material which can give me
> results ASAP as I am already lagging behind my schedule
>
> Cheers, Kunal
>
>
>
> --
> View this message in context: 
> http://servicemix.396122.n5.nabble.com/programmatically-get-server-load-information-from-Apache-ServiceMix-using-JMX-tp5716769.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to