functionA command-line tool for monitoring the various health status information for a virtual machine. It can display the class load, memory, garbage collection, JIT compiling and other running data in the process of local or remote virtual machine, on the server without GUI graphical interface and only provide plain text console environment, it will be the tool of choice for locating virtual machine performance problem at run time.
Example
DescriptionThe parameters interval and count represent the query interval and number of times, and if you omit these two arguments, the main options are as follows:-class: Monitor the time spent on class mounts, unloaded quantities, total space, and class loading-GC: Monitor Java heap conditions, including the Eden Zone, 2 survivor area, old age, permanent generation capacity, used space, GC time total, and other information-gccapacity: The monitoring content is basically the same as-GC, but the output focuses on the maximum and minimum space used by each area of the Java heap-gcutil: monitoring content is basically the same as-GC , but the output focuses on the percentage of total space used-gccause: As with the-gcutil function, but additional output causes the last GC to occur-gcnew: monitor the status of the new generation GC-gcnewcapacity: The monitoring content is basically the same as-gcnew. The output focuses on the maximum and minimum space used-gcold: monitoring the situation of the old GC-gcoldcapacity: The monitoring content is basically the same as the-gcold, the output is mainly concerned with the maximum and minimum space used- Gcpermcapacity: Output The maximum and minimum space used by the permanent Generation-compiler: output JIT compiler compiled methods, time-consuming and other information-printcompilation: The output has been JIT compiled method Take-gcutil as an example to illustrate the meaning of the query results: S0, S1: Two survivor districts, respectively, Survivor0, Survivor1 E: The new generation of Eden Zone O: Old age Area P: Permanent GC number of permanent generation Ygc:minor zone Ygct:minor GC Total time elapsed (seconds) Fgc:full GC times fgct:full GC Total time elapsed (seconds) GCT: All GC Total time Elapsed (sec)
Jstat (JVM Statistics monitoring Tool)