A couple of weeks ago I found this tweet.

In this tweet the whole link is not visible so here it is: https://docs.oracle.com/en/java/javase/11/troubleshoot/index.html. You can even download it from there.

Frankly speaking in my day life while monitoring or troubleshooting my java applications I use mostly jps and jvisualvm. I use jps to find out the PID of the java process, and jvisualvm for profiling my application. I knew that there exist a some of more of them like: jfr, jstack, jconsole etc., but it seems there a bunch of them and there is really good resource in Oracle’s website. But unfortunately they don’t mention about the visualvm or jvisualvm in this troubleshooting guide. However there mentioned about the visualgc tool which is related to the jstat tool. That helps analyze garbage collection. The graphical version of the tool can be downloaded from Oracle’s website. But you may use it via jstat in command line:

1
2
3
4
5
6
7
8
$ jstat -gcutil 49756 2000 5
S0 S1 E O M CCS YGC YGCT FGC FGCT CGC CGCT GCT
0.00 100.00 22.08 0.08 97.33 93.22 2 0.046 0 0.000 0 0.000 0.046
0.00 100.00 22.08 0.08 97.33 93.22 2 0.046 0 0.000 0 0.000 0.046
0.00 100.00 22.08 0.08 97.33 93.22 2 0.046 0 0.000 0 0.000 0.046
0.00 100.00 22.08 0.08 97.33 93.22 2 0.046 0 0.000 0 0.000 0.046
0.00 100.00 22.08 0.08 97.33 93.22 2 0.046 0 0.000 0 0.000 0.046
$

S0 and S1 are the survivors, and E is for Eden Space etc.

I found detailed information about it in man jstat:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
gcutil Summary of Garbage Collection Statistics

+-------+---------------------------------------------------------------+
|Column | Description |
+-------+---------------------------------------------------------------+
|S0 | Survivor space 0 utilization as a percentage of the space's |
| | current capacity. |
|S1 | Survivor space 1 utilization as a percentage of the space's |
| | current capacity. |
|E | Eden space utilization as a percentage of the space's current |
| | capacity. |
|O | Old space utilization as a percentage of the space's current |
| | capacity. |
|P | Permanent space utilization as a percentage of the space's |
| | current capacity. |
|YGC | Number of young generation GC events. |
|YGCT | Young generation garbage collection time. |
|FGC | Number of Full GC events. |
|FGCT | Full garbage collection time. |
|GCT | Total garbage collection time. |
+-------+---------------------------------------------------------------+

And you can find other lots of valuable resources on this page.