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 [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 [ 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)
jinfojinfo [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 |
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://m.hztianpu.com/yun/69776.html
摘要:點(diǎn)擊進(jìn)入我的博客命令行工具這些工具大多數(shù)是類庫的一層薄的包裝,它們的主要功能代碼是在類庫中實(shí)現(xiàn)的??梢暬ぞ呤堑侥壳盀橹闺S發(fā)布的功能最強(qiáng)大的運(yùn)行監(jiān)視和故障處理程序,并且可以預(yù)見在未來一段時(shí)間內(nèi)都是官方主力發(fā)展的虛擬機(jī)故障處理工具。 點(diǎn)擊進(jìn)入我的博客 3.1 JDK命令行工具 showImg(https://segmentfault.com/img/remote/14600000174...
摘要:這些工具包括名稱主要作用顯示指定系統(tǒng)內(nèi)所有的虛擬機(jī)進(jìn)程。虛擬機(jī)堆轉(zhuǎn)存快照分析工具命令用于與搭配使用,用來分析生成的文件。命令格式命令樣例線程堆棧跟蹤工具用于生成虛擬機(jī)當(dāng)前時(shí)刻的線程快照。 概述 給系統(tǒng)定位問題的時(shí)候,知識(shí)、經(jīng)驗(yàn)是關(guān)鍵基礎(chǔ),數(shù)據(jù)是依據(jù),工具是運(yùn)用知識(shí)處理數(shù)據(jù)的手段。 java開發(fā)人員可以在jdk安裝的bin目錄下找到除了java,javac以外的其他命令。這些命令主要是一...
摘要:監(jiān)控和故障處理工具顯示指定系統(tǒng)內(nèi)所有的虛擬機(jī)進(jìn)程用于收集虛擬機(jī)各方面的運(yùn)行數(shù)據(jù)。的常用功能選項(xiàng)測(cè)試上面輸出了我正在運(yùn)行程序的包名下的類名虛擬機(jī)統(tǒng)計(jì)信息監(jiān)視工具使用于監(jiān)視虛擬機(jī)各種運(yùn)行狀態(tài)信息的命令行工具。 《深入理解Java虛擬機(jī):JVM高級(jí)特性與最佳實(shí)踐(第二版》讀書筆記與常見面試題總結(jié) 本節(jié)常見面試題(推薦帶著問題閱讀,問題答案在文中都有提到): JVM調(diào)優(yōu)的常見命令行工具有哪些?...
摘要:虛擬機(jī)性能監(jiān)控與故障處理工具詳解概述本文參考的是周志明的深入理解虛擬機(jī)第四章,為了整理思路,簡(jiǎn)單記錄一下,方便后期查閱。虛擬機(jī)堆轉(zhuǎn)儲(chǔ)快照分析工具功能用于分析生成的。 虛擬機(jī)性能監(jiān)控與故障處理工具 詳解 4.1 概述 本文參考的是周志明的 《深入理解Java虛擬機(jī)》 第四章 ,為了整理思路,簡(jiǎn)單記錄一下,方便后期查閱。 JDK本身提供了很多方便的JVM性能調(diào)優(yōu)監(jiān)控工具,除了集成式的Vis...
摘要:打印等待回收對(duì)象的信息可以看到當(dāng)前隊(duì)列中并沒有等待線程執(zhí)行方法的對(duì)象。一般情況,會(huì)到客戶端用工具來分析用于生成虛擬機(jī)當(dāng)前時(shí)刻的線程快照。 運(yùn)用jvm自帶的命令可以方便的在生產(chǎn)監(jiān)控和打印堆棧的日志信息幫忙我們來定位問題!雖然jvm調(diào)優(yōu)成熟的工具已經(jīng)有很多:jconsole、大名鼎鼎的VisualVM,IBM的Memory Analyzer等等,但是在生產(chǎn)環(huán)境出現(xiàn)問題的時(shí)候,一方面工具的使...
閱讀 1895·2021-10-09 09:44
閱讀 2763·2021-09-22 15:38
閱讀 2581·2021-09-09 09:33
閱讀 779·2021-09-07 09:58
閱讀 1895·2021-09-02 15:41
閱讀 2647·2019-08-30 15:55
閱讀 1866·2019-08-30 15:55
閱讀 632·2019-08-30 15:44