JDK Performance monitoring Tool

Source: Internet
Author: User
Tags jconsole

JDK command-line tools
The JPS:JVM process status Tool, which displays all the hotspot virtual machine processes within the specified system, can be queried through the RMI protocol for the remote virtual machine process state that opened the RMI service

jps [options] [hos tid]列出正在运行的虚拟机进程,显示执行主类,以及虚拟机的唯一ID(Local Virtual Machine Identifier,LVMID),启动参数等

JSTAT:JVM Statisitcs monitoring Tool for collecting operational data for all aspects of htospot virtual machines

jstat [generalOption | outputOptions vmid [interval[s|ms][count]]]可以显示本地或远程虚拟机进程中的类装载,内存,垃圾收集,JIT编译等运行数据。运行期定位虚拟机性能问题的首选

Jinfo:configuration info for Java, displaying virtual machine configuration information

jinfo [options] pid实时查看和调整虚拟机的各项参数

Jmap:memory Map for Java, generating a virtual machine memory dump Snapshot (heapdump file)

jmap [option] vmid与 -XX:+HeapDumoOnOutOfMemoryError参数类似。还可以查询finalize执行队列、Java堆、永久代的信息(空间使用率,收集器类型)

JHAT:JVM Heap Dump Browser, used to parse the Heapdump file, establishes a http/html server that allows the user to view the results of the analysis on the browser

与jmap搭配使用,一般不直接使用jhat来,而是使用专业的Eclipse Memory Analyzer或者IBM HeapAnalyzer等

Jstack:stack Trace for Java, displaying a thread snapshot of a virtual machine

jstack [option] vmid用于生成虚拟机当前时刻的线程快照(threaddump),线程快照就是当前虚拟机内每一条线程正在执行的方法堆栈的集合,定位线程长时间出现停顿的原因,查看没有响应的线程到底在后台做什么,等待什么资源也可以使用Thread.getAllStackTraces()方法用于获取虚拟机中所有线程的StackTraceElement对象

JDK Visualization Tool
Jconsole:java Monitoring and management platform

基于JMX的可视化监视和管理的工具。被监视的虚拟机需要使用可管理的模式启动,启动时设置 com.sun.management.jmxremote使用MBean标签监控和管理MBean、监控内存、开闭虚拟机的详细跟踪

VisualVM: Multi-in-a-fault processing tool

囊括了jstat、JConsole、jstack、jmap、jinfo工具的功能。可以生成和分析海量数据,跟踪内存泄漏,监控垃圾回收,执行内存和CPU分析

JDK Performance monitoring Tool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.