3

Is there any way to see all available configurations like memory used, heap size, stack etc.. of JVM in command propmt.?

Suresh Kb
  • 151
  • 1
  • 8
  • What you actually set at start time or all the options available? All options you get from the Oracle help pages. – Christian Ullenboom Mar 02 '17 at 11:58
  • hmmm you can start from `java -h` and `man java` I suppose :) also have a look at http://www.oracle.com/technetwork/java/javase/documentation/index.html – niceman Mar 02 '17 at 11:59
  • Do you want to know what you can set? Or what configuration a running JVM is operating under? – Thilo Mar 02 '17 at 11:59
  • 1
    also "all availabe configurations" is a broad statement, could you narrow it down to what you really are interested in – niceman Mar 02 '17 at 12:01
  • A number of tools & techniques have been mentioned here http://stackoverflow.com/questions/1193954/can-jconsole-data-be-retrieved-from-the-command-line – Shubham Chaurasia Mar 02 '17 at 12:06

2 Answers2

3

I haven't tried it myself yet. But this tool looks very promising

https://github.com/ajermakovics/jvm-mon

Internally it is using jvmtop (https://github.com/patric-r/jvmtop) but adds some nice dashboard style to it. It basically depends on your exact needs what to use.

dpr
  • 10,591
  • 3
  • 41
  • 71
1

JDK built-in jstat and jcmd utilities can show almost all JVM metrics.

For example, the following command will print more than 200 counters of all JVM subsystems (GC, JIT compiler, Runtime etc.):

jcmd <PID> PerfCounter.print
apangin
  • 92,924
  • 10
  • 193
  • 247