5

I want to monitor JVM performance on my production environment. I have installed only JRE, not JDK, Hence i can't use jstat, jconsole etc. to monitor the JVM performance.

Can somebody please help to understand how can i monitor JVM performance in this scenario?

Is there any way to achieve this?

(please note that i don't want to monitor it remotely through JMX or something else. i would like to install local agent in each machine which will send the metrics to server at the interval of 1 minute.)

Thanks, KS

Kunal
  • 984
  • 4
  • 14
  • 33
  • 1
    JMX is your friend, a tutorial here http://stackoverflow.com/questions/151238/has-anyone-ever-got-a-remote-jmx-jconsole-to-work – Ganchix Jul 28 '14 at 08:00
  • 2
    To those voting to close this as off-topic, I believe this question falls under the "software tools commonly used by programmers" category, and thus is on-topic. The close reason itself reinforces that the question should stay open, as it "directly involve[s] programming or **programming tools**." – FThompson Jul 28 '14 at 19:28
  • What type of application are you monitoring - web, standalone? do you consider commercial tools or free ones or both? are you using any monitoring/APM solution in your company? – Dror Bereznitsky Jul 31 '14 at 11:00
  • i am talking about standalone java, not a web. I am using sensu and graphite for the monitoring. so i want sensu client to send this metrics to sensu server. please let me know if i missing something. – Kunal Jul 31 '14 at 17:25

3 Answers3

1

If you manage to get JMX up and running on your VM (from the comment), you can then use jmxterm or jmxfetch to push these JMX metrics into a metrics system (like graphite or Datadog).

Alexis Lê-Quôc
  • 1,023
  • 7
  • 8
0

If you have enough patience and time to write, you can probably have a look at JVMTI. You can write your code in C/C++ and run it along your Java Process and you can gather information about the JVM without affecting it.

Another simple and naive way is to start your VM with a javaagent written in java but JVMTI is even better than that. The most crucial difference between the javaagent and JVMTI app is derived from the loading mechanics. While the agents are loaded inside the heap, they are governed by the same JVM. Whereas the JVMTI agents are not governed by the JVM rules and are thus not affected by the JVM internals such as the GC or runtime error handling.

You can even give Java Mission Control a try if you're using JDK7 or above :)

Arkantos
  • 6,530
  • 2
  • 16
  • 36
0

Jolokia is a java agent you can use to expose JMX as http. Run jmx2graphite and get those metrics into Graphite. The link includes instructions on Graphite installation (10 minutes)

Asaf Mesika
  • 1,643
  • 4
  • 20
  • 33