jcmd

Sends diagnostic command requests to a running Java Virtual Machine (JVM).

Synopsis

jcmd [-l|-h|-help]

jcmd pid|main-class PerfCounter.print

jcmd pid|main-class -f filename

jcmd pid|main-class commandarguments]

Description

The jcmd utility is used to send diagnostic command requests to the JVM. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM.

Note:

To invoke diagnostic commands from a remote machine or with different identifiers, you can use the com.sun.management.DiagnosticCommandMBean interface. For more information about theDiagnosticCommandMBean interface, see the API documentation athttp://docs.oracle.com/javase/8/docs/jre/api/management/extension/com/sun/management/DiagnosticCommandMBean.html

If you run jcmd without arguments or with the -l option, it prints the list of running Java process identifiers with the main class and command-line arguments that were used to launch the process. Running jcmd with the -h or -help option prints the tool's help message.

Note:

The jcmd utility can be used to dynamically interact with Java Flight Recorder (JFR) in a JVM that is already running. You can use it to unlock commercial features, enable/start/stop flight recordings, and obtain various status messages from the system. For a list of examples, see the Java Flight Recorder Runtime Guide at http://docs.oracle.com/javacomponents/jmc.htm

If you specify the processes identifier (pid) or the main class (main-class) as the first argument, jcmd sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class. You can also send the diagnostic command request to all available Java processes by specifying 0 as the process identifier. Use one of the following as the diagnostic command request:

Perfcounter.print

Prints the performance counters available for the specified Java process. The list of performance counters might vary with the Java process.

-f filename

The name of the file from which to read diagnostic commands and send them to the specified Java process. Used only with the -f option. Each command in the file must be written on a single line. Lines starting with a number sign (#) are ignored. Processing of the file ends when all lines have been read or when a line containing the stop keyword is read.

command [arguments]

The command to be sent to the specified Java process. The list of available diagnostic commands for a given process can be obtained by sending the help command to this process. Each diagnostic command has its own set of arguments. To see the description, syntax, and a list of available arguments for a command, use the name of the command as the argument for the help command.

Note: If any arguments contain spaces, you must surround them with single or double quotation marks (' or "). In addition, you must escape single or double quotation marks with a backslash (\) to prevent the operating system shell from processing quotation marks. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks).

Options

Options are mutually exclusive.

-f filename

Reads commands from the specified file. This option can be used only if you specify the process identifier or the main class as the first argument. Each command in the file must be written on a single line. Lines starting with a number sign (#) are ignored. Processing of the file ends when all lines have been read or when a line containing the stop keyword is read.

-h
-help

Prints a help message.

-l

Prints the list of running Java processes identifiers with the main class and command-line arguments.

java性能监控工具jcmd-windows的更多相关文章

  1. 五大最佳开源java性能监控工具

    如果你正在寻找性能监控工具,不妨看看以下推荐的这五款开源工具,这些工具目前已经可以替代付费工具了,你可以看看是否是你的最佳选择.本文推荐的五款开源工具目前是开源社区中最受欢迎的. 1. Stagemo ...

  2. Java性能监控工具:VisualVM

    VisualVM是JDK自带的一款全能型性能监控和故障分析工具,包括对CPU使用.JVM堆内存消耗.线程.类加载的实时监控,内存dump文件分析,垃圾回收运行情况的可视化分析等,对故障排查和性能调优很 ...

  3. java性能监控工具jstat

    jstat Monitors Java Virtual Machine (JVM) statistics. This command is experimental and unsupported. ...

  4. java性能监控工具jstat-windows

    jstat Monitors Java Virtual Machine (JVM) statistics. This command is experimental and unsupported. ...

  5. java性能监控工具jmc-windows

    jmc Java Mission Control is a Profiling, Monitoring, and Diagnostics Tools Suite. Synopsis jmc [ opt ...

  6. java性能监控工具jconsole-windows

    jconsole Starts a graphical console that lets you monitor and manage Java applications. Synopsis jco ...

  7. JProfiler 8(一个很好的java性能监控工具) 下载和注册码

    windows x64 zip下载地址:http://download-aws.ej-technologies.com/jprofiler/jprofiler_windows-x64_8_0_1.zi ...

  8. java性能监控工具:jmap命令详解

    .命令基本概述 Jmap是一个可以输出所有内存中对象的工具,甚至可以将VM 中的heap,以二进制输出成文本.打印出某个java进程(使用pid)内存内的,所有‘对象’的情况(如:产生那些对象,及其数 ...

  9. java性能监控工具jps-windows

    jps Lists the instrumented Java Virtual Machines (JVMs) on the target system. This command is experi ...

随机推荐

  1. Eclipse下创建Spring MVC web程序--非maven版

    首先, 安装eclipse和tomcat, 这里我下载的是tomcat9.0版本64位免安装的:地址https://tomcat.apache.org/download-90.cgi 免安装的如何启动 ...

  2. 【SDOJ 3741】 【poj2528】 Mayor's posters

    Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral electio ...

  3. 区别Transform、Transition、Animation

    另一篇参考文章:http://www.7755.me/Article/CSS3/39/ 近来上班之外就是研究研究CSS动画,下面是第一阶段总结.话说为加强记忆,实则想抛砖引玉!   标题直译一下就是: ...

  4. C# TypeDescriptor获取类型转换器,实现泛型转换

    需求背景 平时的coding过程中,经常性遇到string类型转换成其他的基本类型,如 int double bool等,那我们正常的方式就是下面的方式进行类型转换 int.Parse("1 ...

  5. DS博客作业05—树

    1.本周学习总结 1.1思维导图 1.2学习体会 本周学习了树的相关知识,了解了树结构体的应用和基本操作 学习了二叉树的遍历,创建以及哈夫曼树的相关操作 通过树的构建等操作熟练了递归的使用 2.PTA ...

  6. 【Luogu】P2569股票交易(单调队列优化DP)

    题目链接 首先这题可以肯定的是朴素DP秒出.然后单调队列优化因为没接触过所以不会emmm 而且脑补没补出来 坐等四月省选倒数第一emmm 心态爆炸,偷懒放题解链接 #include<cstdio ...

  7. [luoguP2754] 星际转移问题(最大流)

    传送门 不同的时间每个飞船所在的地点不同,给我们启示按照时间构建分层图. 同一个地点 x <x, dayi - 1> -> <x, dayi> 连一条容量为 INF 的边 ...

  8. bzoj1566【Noi2009】管道取珠

    题意:http://www.lydsy.com/JudgeOnline/problem.php?id=1566 两个栈不断pop,共C(n+m,n)种,ai表示每个相同序列的方案数,求∑(ai^2) ...

  9. hdu 6119 小小粉丝度度熊

    小小粉丝度度熊 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Sub ...

  10. TYVJ 1305 最大子序和 ++ 烽火传递

    描述 输入一个长度为n的整数序列,从中找出一段不超过M的连续子序列,使得整个序列的和最大. 例如 1,-3,5,1,-2,3 当m=4时,S=5+1-2+3=7当m=2或m=3时,S=5+1=6 输入 ...