资讯专栏INFORMATION COLUMN

JDK Tools Notes for jps, jstate, and jinfo

gxyz / 771人阅读

JDK Tools
Name Description
jps JVM Process Status Tool, list all HoSpot processes
jstat JVM Statistics Monitoring Tool, collector HotSpot runtime info
jinfo Configuration Info for Java (JVM)
jmap Memory Map for Java, generate heapdump file
jhat JVM Heap Dump Browser, analyse heapdump info
jstack Stack Trace for Java, thread dump info
jps

jps [options] [hostid]

List the Local Virtual Machine Identifier (LVMID), similar to ps in UNIX. It"s usually the first step to determine which process to monitor in deep.

Option Description
-q Only print out LVMID
-m List all the parameters that are passed to main class
-l List the full name, or the full path to the jar file
-v List all the JVM runtime parameters
jstat

jstat [ option vmid [] interval [s|ms] [count] ]

If the process is in local, VMID is the same with LVMID. If it"s an remote process, VMID should be in the following format [protocol:][//]lvmid[@hostname[:port]/servername]

Example of jstat: jstat -gc 2764 250 20, looking 2764 process"s GC info for 20 times with 250 ms interval.

Option Description
-class Time spend on loading, count of unloading, total space and etc.
-gc Java heap status, including Eden, Survivor, old generation and PermGen. Space and Time spending on GC
-gccapcity Max and min space of java heap
-gcutil The percentage of java heap usage
-gccause List the cause of last GC
-gcnew NewGen GC status
-gcnewcapacity Max and min space of NewGen
-gcold OldGen GC status
-gcoldcapcity Max and min space of OldGen
-gcpermcapcity Max and min space of PermGen
-compiler The method and time compiled by JIT
-printcompilation List all methods that are compiled

Note:

S0, S1 -> Survivor 0, 1

YGC -> Young GC (Minor GC)

FGC -> Full GC (Major GC)

jinfo

jinfo [option] pid

Option Description
-sysprops print out result of System.getProperites()
-flag name List the config info of that flag
-flag name=value Edit the config info of that flag

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/69776.html

相关文章

  • JVM详解3.JDK监控和故障处理工具

    摘要:点击进入我的博客命令行工具这些工具大多数是类库的一层薄的包装,它们的主要功能代码是在类库中实现的。可视化工具是到目前为止随发布的功能最强大的运行监视和故障处理程序,并且可以预见在未来一段时间内都是官方主力发展的虚拟机故障处理工具。 点击进入我的博客 3.1 JDK命令行工具 showImg(https://segmentfault.com/img/remote/14600000174...

    Keven 评论0 收藏0
  • java虚拟机故障处理工具

    摘要:这些工具包括名称主要作用显示指定系统内所有的虚拟机进程。虚拟机堆转存快照分析工具命令用于与搭配使用,用来分析生成的文件。命令格式命令样例线程堆栈跟踪工具用于生成虚拟机当前时刻的线程快照。 概述 给系统定位问题的时候,知识、经验是关键基础,数据是依据,工具是运用知识处理数据的手段。 java开发人员可以在jdk安装的bin目录下找到除了java,javac以外的其他命令。这些命令主要是一...

    loonggg 评论0 收藏0
  • 深入理解虚拟机之虚拟机性能监控和故障处理工具

    摘要:监控和故障处理工具显示指定系统内所有的虚拟机进程用于收集虚拟机各方面的运行数据。的常用功能选项测试上面输出了我正在运行程序的包名下的类名虚拟机统计信息监视工具使用于监视虚拟机各种运行状态信息的命令行工具。 《深入理解Java虚拟机:JVM高级特性与最佳实践(第二版》读书笔记与常见面试题总结 本节常见面试题(推荐带着问题阅读,问题答案在文中都有提到): JVM调优的常见命令行工具有哪些?...

    jas0n 评论0 收藏0
  • 《深入理解Java虚拟机》(四)虚拟机性能监控与故障处理工具

    摘要:虚拟机性能监控与故障处理工具详解概述本文参考的是周志明的深入理解虚拟机第四章,为了整理思路,简单记录一下,方便后期查阅。虚拟机堆转储快照分析工具功能用于分析生成的。 虚拟机性能监控与故障处理工具 详解 4.1 概述 本文参考的是周志明的 《深入理解Java虚拟机》 第四章 ,为了整理思路,简单记录一下,方便后期查阅。 JDK本身提供了很多方便的JVM性能调优监控工具,除了集成式的Vis...

    gself 评论0 收藏0
  • jvm调优-命令篇

    摘要:打印等待回收对象的信息可以看到当前队列中并没有等待线程执行方法的对象。一般情况,会到客户端用工具来分析用于生成虚拟机当前时刻的线程快照。 运用jvm自带的命令可以方便的在生产监控和打印堆栈的日志信息帮忙我们来定位问题!虽然jvm调优成熟的工具已经有很多:jconsole、大名鼎鼎的VisualVM,IBM的Memory Analyzer等等,但是在生产环境出现问题的时候,一方面工具的使...

    Lsnsh 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<