Monitors several JVM commands (which can be used on a linux host) and jvmlinux
1. jstat
This command is useful for viewing Jvm stack information. Allows you to view the capacity and utility information of heap such as eden, kernel vor, old, and perm.
It makes sense to check whether the system has leakage and whether the parameter settings are reasonable.
2. jstack
This is used to view the current thread dump of jvm. The thread status in the current Jvm is displayed.
This makes sense for finding blocked threads.
3. jmap.
This is used to view the current heap dump of jvm. We can see the number and occupied space of various objects in the current jvm.
It is particularly worth mentioning that this command can hold a binary heap dump binfile everywhere, which can be directly used
Eclipse Memory Anayliser to analyze and identify potential Memory leaks.
4. Another useful non-jvm command-netstat
This command shows the connection status of the linux system on each port, such as the number of database connections.
Jstat
1. jstat-gc pid
The gc information is displayed, and the gc count and time are displayed.
The last five items are the young gc count, young gc time, full gc count, full gc time, and total gc time.
2. jstat-gccapacity pid
The usage and usage of three generations (young, old, perm) objects in VM memory are displayed,
For example, pgcen displays the minimum memory usage of perm, while PGCMX displays the maximum memory usage of perm,
PGC is the memory usage of the newly generated perm, while PC is the memory usage of the previous perm.
For others, the OC usage is pure in old.
3. jstat-gcutil pid
Collect gc statistics.
4. jstat-gcnew pid
The information of the young object.
5. jstat-gcnewcapacity pid
The information and usage of the young object.
6. jstat-gcold pid
Old generation object information.
7. stat-gcoldcapacity pid
The information and usage of the old object.
8. jstat-gcpermcapacity pid
Perm object information and usage.
9. jstat-class pid
Displays the number of loaded classes and the occupied space.
10. jstat-compiler pid
Displays information such as the number of VM real-time compilations.
11. stat-printcompilation pid
Information of the current VM execution.
Chinese explanations of some terms:
S0C: the capacity (in bytes) of the first surviving vor in the young generation)
S1C: the capacity (in bytes) of the second surviving vor in the young generation)
S0U: The first surviving vor in the young generation. Currently, space (in bytes) is used)
S1U: The second surviving vor in the young generation. Currently, space (in bytes) is used)
EC: Capacity (bytes) of Eden in the young generation)
EU: the young generation of Eden (Eden) currently uses space (bytes)
OC: the size of the Old generation (in bytes)
OU: the Old generation currently uses space (in bytes)
PC: Perm (persistent generation) Capacity (bytes)
PU: Perm (persistent generation) Space (bytes) used currently)
YGC: Number of gc times in the young generation from application startup to sampling
YGCT: gc time in the young generation from application startup to sampling (s)
FGC: Number of gc times of the old generation (full gc) from application startup to sampling
FGCT: the time (s) taken by the old generation (full gc) gc from application startup to sampling)
GCT: Total gc time from application startup to sampling (s)
Ngcen: size (in bytes) of the initialization (minimum) in young generation (young)
NGCMX: Maximum capacity (bytes) of young generation)
NGC: current capacity (bytes) in young generation (young)
Size (in bytes) of the initialization (minimum) in the old generation)
OGCMX: the maximum size (in bytes) of the old generation)
OGC: the capacity (in bytes) generated by the old generation)
Pgcen: the minimum size (in bytes) of the initialization in the perm generation)
PGCMX: Maximum capacity (bytes) of the perm generation)
PGC: the capacity (in bytes) generated by the perm generation)
S0: Percentage of the first surviving vor in the young generation used in the current capacity
S1: Percentage of used vor In the second surviving zone of the young generation in the current capacity
E: Percentage of Eden (Eden) used in the young generation in the current capacity
O: Percentage of used by the old generation to the current capacity
P: Percentage of the used perm generation to the current capacity
S0CMX: Maximum capacity (in bytes) of the first surviving vor in the young generation)
S1CMX: Maximum capacity (in bytes) of the second surviving vor in the young generation)
ECMX: the maximum capacity (in bytes) of Eden in the young generation)
DSS: the capacity (in bytes) of the active VOR (the Eden zone is full)
TT: the maximum number of Hold times.
MTT: Maximum number of Hold times limit
Jstack
Jmap