輸入:jstat -help得到以下幫助信息
Usage: jstat --help|-options jstat -<option> [-t] [-h<lines>] <vmid> [<interval> [<count>]] Definitions: <option> An option reported by the -options option <vmid> Virtual Machine Identifier. A vmid takes the following form: <lvmid>[@<hostname>[:<port>]] Where <lvmid> is the local vm identifier for the target Java virtual machine, typically a process id; <hostname> is the name of the host running the target Java virtual machine; and <port> is the port number for the rmiregistry on the target host. See the jvmstat documentation for a more complete description of the Virtual Machine Identifier. <lines> Number of samples between header lines. <interval> Sampling interval. The following forms are allowed: <n>["ms"|"s"] Where <n> is an integer and the suffix specifies the units as milliseconds("ms") or seconds("s"). The default units are "ms". <count> Number of samples to take before terminating. -J<flag> Pass <flag> directly to the runtime system. -? -h --help Prints this help message. -help Prints this help message.
option:操作(見下面的option說明)
vmid:進程pid
lines:
interval:輸出時間間隔,單位ms和s
count:輸出條目行數
輸入:jstat -option得到以下選項
-class // 顯示類加載信息
-compiler // 顯示編譯信息
-gc // 顯示GC相關信息
-gccapacity // 顯示各區域容量及使用情況
-gccause // 顯示垃圾回收信息
-gcmetacapacity // 顯示元空間容量信息
-gcnew // 顯示新生代信息
-gcnewcapacity // 顯示新生代容量信息
-gcold // 顯示老年代信息
-gcoldcapacity // 顯示老年代容量信息
-gcutil // 顯示垃圾收集信息
-printcompilation // 顯示JIT編譯的方法信息
命令實際使用
jstat -gcutil 20272 2s 3
統計列含義
S0C:第一個幸存者區(Survivor Space)容量
S1C:第二個幸存者區(Survivor Space)容量
S0U:第二個幸存者區使用量
S1U:第二個幸存者區使用量
EC:伊甸園去容量
EU:伊甸園區使用量
OC:Old Generation區容量
OU:Old Generation使用量
MC:Mataspace區容量
MU:Mataspace區實際使用量
CCSC:壓縮類空間大小(不是很懂,先標記一下)
CCSU:壓縮類空間使用率(不是很懂,先標記一下)
YGC:年輕代垃圾回收次數
YGCT:年輕代垃圾回收時間
FGC:年老代垃圾回收次數
FGCT:年老代垃圾回收時間
GCT:總垃圾回收時間
S0:S0C區域使用率
S0:S1C區域使用率
E:伊甸園去使用率
O:Old Generation使用率,OU/OC
M:Matespace區使用率,MU/MC
CCS:壓縮類空間使用率