2. JPS 类似于 unix 的 ps,列出所有进程,这个是列出所有 Java 进程 -q Suppress the output of the class name, JAR file name, and arguments passed to the main method, producing only a list of local VM identifiers. -m Output the arguments passed to the main method. The output may be null for embedded JVMs. -l Output the full package name for the application's main class or the full path name to the application's JAR file. -v Output the arguments passed to the JVM. -V Output the arguments passed to the JVM through the flags file (the .hotspotrc file or the file specified by the -XX:Flags= argument). -Joption Pass option to the java launcher called by jps. For example, -J-Xms48m sets the startup memory to 48 megabytes. It is a common convention for -J to pass options to the underlying VM executing applications written in Java.
3. Jstat - Java VM stastics Monitor Tool The jstat tool displays performance statistics for an instrumented HotSpot Java virtual machine (JVM).
-statOption Determines the statistics information that jstat displays. The following table lists the available options. Use the -options general option to display the list of options for a particular platform installation.
Option Displays... class Statistics on the behavior of the class loader. compiler Statistics of the behavior of the HotSpot Just-in-Time compiler. gc Statistics of the behavior of the garbage collected heap. gccapacity Statistics of the capacities of the generations and their corresponding spaces. gccause Summary of garbage collection statistics (same as -gcutil), with the cause of the last and current (if applicable) garbage collection events. gcnew Statistics of the behavior of the new generation. gcnewcapacity Statistics of the sizes of the new generations and its corresponding spaces. gcold Statistics of the behavior of the old and permanent generations. gcoldcapacity Statistics of the sizes of the old generation. gcpermcapacity Statistics of the sizes of the permanent generation. gcutil Summary of garbage collection statistics. printcompilation HotSpot compilation method statistics.
-h n Display a column header every n samples (output rows), where n is a positive integer. Default value is 0, which displays the column header above the first row of data. -t n Display a timestamp column as the first column of output. The timestamp is the the time since the start time of the target JVM. -JjavaOption Pass javaOption to the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes. For a complete list of options, see java - the Java application launcher
4. Jinfo 显示 Java 配置信息 prints Java configuration information for a given Java process or core file or a remote debug server. Configuration information includes Java System properties and Java virtual machine command line flags. 注意:目前 不支持 linux/Windows
5. Jstack Statck Trace jstack prints Java stack traces of Java threads for a given Java process or core file or a remote debug server ex. jstatck -l 2648
没有评论:
发表评论