4

I am looking for jvm performance tools which have features:

  1. Running in background.
  2. Collect memory and thread information.
  3. Generate performance data in readable text format, which is easily consumed by cmd like grep, awk, sort and so on.

In short words, it's cli version of jconsole.

jstat included in oracle jvm meets 1 and 3, but doesn't collect thread information. I think there should be some more sophisticated tools exist.

Any suggestion? Thanks in advance!

turtledove
  • 25,464
  • 3
  • 23
  • 20

3 Answers3

3

There is TJConsole project that is text mode JConsole. https://github.com/m-szalik/tjconsole

m-szalik
  • 3,546
  • 1
  • 21
  • 28
2

Suggestions:

  • HeapAudit - HeapAudit is a java agent which audits heap allocations for JVM processes.
  • jStack/jMap found in the Java Install
  • Alternatively if jConsole has all you need, why not get the data yourself. jConsole is just a wrapper around MBeans which you can access directly through the API. Example
  • BTrace - BTrace is a safe, dynamic tracing tool for the Java platform.
Dane Balia
  • 5,271
  • 5
  • 32
  • 57
  • jstack/jmap is more diagnosis tools, but not statistics tools, althrough they can be used for statistics. Implements my own tools using MBean API is a solution, if there are no tools exists yet. I think there should be more handy tools for this application, i just don't know them yet. thanks anyway – turtledove Sep 27 '12 at 04:46
2

Maybe jvmtop is worth a look:

 JvmTop 0.4.1 amd64  8 cpus, Linux 2.6.32-27, load avg 0.12
 http://code.google.com/p/jvmtop

  PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL
 3370 rapperSimpleApp  165m  455m  109m  176m  0.12%  0.00% S6U37 web        21
11272 ver.resin.Resin [ERROR: Could not attach to VM]
27338 WatchdogManager   11m   28m   23m  130m  0.00%  0.00% S6U37 web        31
19187 m.jvmtop.JvmTop   20m 3544m   13m  130m  0.93%  0.47% S6U37 web        20
16733 artup.Bootstrap  159m  455m  166m  304m  0.12%  0.00% S6U37 web        46
MRalwasser
  • 15,605
  • 15
  • 101
  • 147