sun.tools.jstat.Jstat - "jstat" Command

Q

How to run "jstat" command from JDK tools.jar file?

✍: FYIcenter

A

"jstat" command allows you to run the JVM Statistics Monitoring tool on your computer system.

"jstat" command is supported by the lib\tools.jar JAR file JDK 1, 2, 3, 4, 5, 6, 7, and 8.

You can run the "jstat" command using the JDK tools.jar file as described below using JDK 8 as an example:

C:\fyicenter>set JDK_HOME=\fyicenter\jdk-1.8.0_191

C:\fyicenter>%JDK_HOME%\bin\java -cp %JDK_HOME%\lib\tools.jar sun.tools.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.

 

sun.tools.native2ascii.Main - "native2ascii" Command

sun.tools.jstatd.Jstatd - "jstatd" Command

Tools Supported from JDK 8- JAR Files

⇑⇑ FAQ for JDK (Java Development Kit)

2019-11-08, 306👍, 0💬