JVM工具jstat使用说明

输入: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.

输入:jstat -option得到以下命令

-class
-compiler
-gc
-gccapacity
-gccause
-gcmetacapacity
-gcnew
-gcnewcapacity
-gcold
-gcoldcapacity
-gcutil
-printcompilation

命令实际使用

jstat -gcutil 20272 2s 3

gc列含义

  S0C:From Survivor Space容量

  S1C:To Survivor Space容量

  MU:Mataspace区实际使用量

  MC:Mataspace区容量

  OC:Old Generation区容量

  OU:Old Generation使用量

  

  S0:S0C区域使用率

  S0:S1C区域使用率

  E:

  O:Old Generation使用率,OU/OC

  M:Matespace区使用率,MU/MC

待补充完善

猜你喜欢

转载自www.cnblogs.com/zhi-leaf/p/10629776.html