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. webdriver高级应用- 使用Chrome浏览器自动将文件下载到指定路径

    #encoding=utf-8 from selenium import webdriver import unittest, time class TestDemo(unittest.TestCas ...

  2. python week08 并发编程之多进程--实践部分

    一 multiprocessing模块介绍 python中的多线程无法利用多核优势,如果想要充分地使用多核CPU的资源(os.cpu_count()查看),在python中大部分情况需要使用多进程.P ...

  3. 突然想看单纯形 BZOJ3265 志愿者招募加强版

    本来的版本是可以差分之后建图利用网络流,这个题是板子题,就当存个板子,嘻嘻嘻 讲解可以到卿学姐的算法讲堂 https://www.bilibili.com/video/av7847726?from=s ...

  4. Unity3D - UGUI的手动搭建

    了解UGUI组件的搭建方式,有助于搭建我们自己的UI界面. Text 文本 text 是UGUI中的基本控件,在Hierarchyi面板创建一个空物体 - 给这个空物体添加一个Text组件即可实现与t ...

  5. Welcome-to-Swift-15反初始化(Deinitialization)

    在一个类的实例被释放之前,反初始化函数被立即调用.用关键字deinit来标示反初始化函数,类似于初始化函数用init来标示.反初始化函数只适用于类类型. 反初始化原理 Swift会自动释放不再需要的实 ...

  6. 【bzoj2802】[Poi2012]Warehouse Store 贪心+堆

    题目描述 有一家专卖一种商品的店,考虑连续的n天.第i天上午会进货Ai件商品,中午的时候会有顾客需要购买Bi件商品,可以选择满足顾客的要求,或是无视掉他.如果要满足顾客的需求,就必须要有足够的库存.问 ...

  7. 【bzoj1163/bzoj1339】[Baltic2008]Mafia 网络流最小割

    题目描述 匪徒准备从一个车站转移毒品到另一个车站,警方准备进行布控. 对于每个车站进行布控都需要一定的代价,现在警方希望使用最小的代价控制一些车站,使得去掉这些车站后,匪徒无法从原定的初始点到达目标点 ...

  8. 【Luogu】P3574FAR_FarmCraft(树形贪心)

    题解链接 想了一个错的贪心爆零了,气死. 题目链接 #include<cstdio> #include<cctype> #include<cstring> #inc ...

  9. [SPOJ-PT07J] Query on tree III (主席树)

    题意翻译 你被给定一棵带点权的n个点的有根数,点从1到n编号. 定义查询 query(x,k): 寻找以x为根的k大点的编号(从小到大排序第k个点) 假设没有两个相同的点权. 输入格式: 第一行为整数 ...

  10. hdu 4372 Count the Buildings 轮换斯特林数

    题目大意 n栋楼有n个不同的高度 现在限制从前面看有F个点,后面看有B个点 分析 最高那栋楼哪都可以看到 剩下的可以最高那栋楼前面分出F-1个组 后面分出B-1个组 每个组的权值定义为组内最高楼的高度 ...