Basic
jstat [ generalOption | outputOptions vmid [ interval[s|ms] [ count ] ]
-
generalOption
A single general command-line option -help or -options. See General Options.
jstat -options 可以查看支持的选项
image.png
class: Displays statistics about the behavior of the class loader.
compiler: Displays statistics about the behavior of the Java HotSpot VM Just-in-Time compiler.
gc: Displays statistics about the behavior of the garbage collected heap.
gccapacity: Displays statistics about the capacities of the generations and their corresponding spaces.
gccause: Displays a summary about garbage collection statistics (same as -gcutil), with the cause of the last and current (when applicable) garbage collection events.
gcnew: Displays statistics of the behavior of the new generation.
gcnewcapacity: Displays statistics about the sizes of the new generations and its corresponding spaces.
gcold: Displays statistics about the behavior of the old generation and metaspace statistics.
gcoldcapacity: Displays statistics about the sizes of the old generation.
gcmetacapacity: Displays statistics about the sizes of the metaspace.
gcutil: Displays a summary about garbage collection statistics.
printcompilation: Displays Java HotSpot VM compilation method statistics.
-
outputOptions
One or more output options that consist of a single statOption, plus any of the -t, -h, and -J options. See Output Options.
-h n
Displays a column header every n samples (output rows), where n is a positive integer. Default value is 0, which displays the column header the first row of data.
-t
Displays a timestamp column as the first column of output. The time stamp is the time since the start time of the target JVM. -
vmid
-
interval
间隔时间,默认是ms -
count
Number of samples to display. The default value is infinity which causes the jstat command to display statistics until the target JVM terminates or the jstat command is terminated. This value must be a positive integer.
网友评论