JAVA自带监控工具的介绍
转:http://www.alidw.com/?p=326

-XX:MaxPermSize=134217728
-XX:PermSize=134217728
-XX:LargePageSizeInBytes=134217728
S0 S1 E O P YGC YGCT FGC FGCT GCT
100.00 0.00 70.12 2.33 43.55 4 0.243 0 0.000 0.243
100.00 0.00 70.12 2.33 43.55 4 0.243 0 0.000 0.243
100.00 0.00 70.79 2.33 43.56 4 0.243 0 0.000 0.243
100.00 0.00 75.15 2.33 43.79 4 0.243 0 0.000 0.243
100.00 0.00 75.15 2.33 43.79 4 0.243 0 0.000 0.243
100.00 0.00 81.15 2.33 44.51 4 0.243 0 0.000 0.243
100.00 0.00 83.15 2.33 44.63 4 0.243 0 0.000 0.243
S0 S1 E O P YGC YGCT FGC FGCT GCT LGCC GCC
100.00 0.00 93.97 2.35 44.71 4 0.259 0 0.000 0.259 unknown GCCause No GC
100.00 0.00 93.97 2.35 44.72 4 0.259 0 0.000 0.259 unknown GCCause No GC
S1 Survivor space 1 utilization as a percentage of the space’s current capacity.
E Eden space utilization as a percentage of the space’s current capacity.
O Old space utilization as a percentage of the space’s current capacity.
P Permanent space utilization as a percentage of the space’s current capacity.
YGC Number of young generation GC events.
YGCT Young generation garbage collection time.
FGC Number of full GC events.
FGCT Full garbage collection time.
GCT Total garbage collection time.
LGCC Cause of last Garbage Collection.
GCC Cause of current Garbage Collection.
Loaded Bytes Unloaded Bytes Time
8209 17577.9 0 0.0 1.68
Compiled Failed Invalid Time FailedType FailedMethod
1029 0 0 9.42 0
S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
26176.0 26176.0 0.0 26176.0 209792.0 75798.8 1835008.0 72266.8 131072.0 60144.0 5 0.338 0 0.000 0.338
-gccapacity:可以显示,VM内存中三代(包括新生区,老年区,permanent区)对象的使用和占用大小,如:PGCMN显示的是最小
perm的内存使用量,PGCMX显示的是perm的内存最大使用量,PGC是当前新生成的perm内存占用量,PC是但前perm内存占用量。其他的可
以根据这个类推, OC是old内纯的占用量。
NGCMN NGCMX NGC S0C S1C EC OGCMN
OGCMX OGC OC PGCMN PGCMX PGC PC
YGC FGC
262144.0 262144.0 262144.0 26176.0 26176.0 209792.0 1835008.0
1835008.0 1835008.0 1835008.0 131072.0 131072.0 131072.0 131072.0
5 0
S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT
26176.0 26176.0 0.0 26176.0 1 4 13088.0 209792.0 76512.8 5 0.338
-printcompilation pid:当前VM执行的信息。除了以上一个参数外,还可以同时加上 两个数字,如:jstat
-printcompilation 3024 250 6是每250毫秒打印一次,一共打印6次,还可以加上-h3每三行显示一下标题。
2009-12-24 18:45:19
Full thread dump Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode):
java.lang.Thread.State: RUNNABLE
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
– waiting on <0×00002aaabc8700d8> (a org.apache.tomcat.util.net.MasterSlaveWorkerThread)
at java.lang.Object.wait(Object.java:485)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.await(MasterSlaveWorkerThread.java:81)
– locked <0×00002aaabc8700d8> (a org.apache.tomcat.util.net.MasterSlaveWorkerThread)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:107)
at java.lang.Thread.run(Thread.java:619)
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
– waiting on <0×00002aaabcaef5d0> (a org.apache.tomcat.util.net.MasterSlaveWorkerThread)
at java.lang.Object.wait(Object.java:485)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.await(MasterSlaveWorkerThread.java:81)
– locked <0×00002aaabcaef5d0> (a org.apache.tomcat.util.net.MasterSlaveWorkerThread)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:107)
at java.lang.Thread.run(Thread.java:619)
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:559)
– locked <0×00002aaabcd6ea98> (a org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at java.lang.Thread.run(Thread.java:619)
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
– locked <0×00002aaabcfedfd8> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:306)
at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:660)
at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:870)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
———————————————-
1: 251510 39395232 [C
2: 53304 37733944 [I
3: 90608 12763752 <constMethodKlass>
4: 90608 10883664 <methodKlass>
5: 256090 10243600 java.lang.String
6: 8209 9233040 <constantPoolKlass>
7: 74133 9109848 [B
8: 129787 6779512 <symbolKlass>
9: 8209 6552912 <instanceKlassKlass>
10: 111943 6268808 java.util.HashMap$ValueIterator
11: 94562 6051968 java.util.TreeMap$Entry
12: 7083 5493440 <constantPoolCacheKlass>
13: 109800 5270400 org.apache.catalina.LifecycleEvent
14: 28087 5116800 [Ljava.lang.Object;
15: 34532 4681168 [Ljava.util.HashMap$Entry;
16: 27458 4173616 java.lang.reflect.Method
17: 109800 3498960 [Lorg.apache.catalina.Container;
18: 66949 3213552 java.util.HashMap$Entry
19: 109970 2771112 [Lorg.apache.catalina.LifecycleListener;
20: 32831 2101184 java.util.HashMap
21: 34327 1828320 [Ljava.lang.String;
22: 21356 1708480 java.util.TreeMap
23: 8785 1616440 java.lang.Class
12191可以将12191进程的内存heap输出出来到heap.log 文件里。
-heap pid(该命令我用的比较多) 打印出heap情况,可以观察到New Generation(Eden Space,From
Space,To Space),tenured generation,Perm Generation的内存使用情况。
Attaching to process ID 12191, please wait…
Debugger attached successfully.
Server compiler detected.
JVM version is 11.0-b16
using thread-local object allocation.
Concurrent Mark-Sweep GC
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 2147483648 (2048.0MB)
NewSize = 268435456 (256.0MB)
MaxNewSize = 268435456 (256.0MB)
OldSize = 805306368 (768.0MB)
NewRatio = 7
SurvivorRatio = 8
PermSize = 134217728 (128.0MB)
MaxPermSize = 134217728 (128.0MB)
New Generation (Eden + 1 Survivor Space):
capacity = 241631232 (230.4375MB)
used = 94646792 (90.26221466064453MB)
free = 146984440 (140.17528533935547MB)
39.16993313182296% used
Eden Space:
capacity = 214827008 (204.875MB)
used = 67842568 (64.69971466064453MB)
free = 146984440 (140.17528533935547MB)
31.580092573835035% used
From Space:
capacity = 26804224 (25.5625MB)
used = 26804224 (25.5625MB)
free = 0 (0.0MB)
100.0% used
To Space:
capacity = 26804224 (25.5625MB)
used = 0 (0.0MB)
free = 26804224 (25.5625MB)
0.0% used
concurrent mark-sweep generation:
capacity = 1879048192 (1792.0MB)
used = 74001208 (70.57305145263672MB)
free = 1805046984 (1721.4269485473633MB)
3.9382283176694597% used
Perm Generation:
capacity = 134217728 (128.0MB)
used = 61586560 (58.7335205078125MB)
free = 72631168 (69.2664794921875MB)
45.885562896728516% used
<no option>
When no option is used jmap prints shared object mappings. For each shared object loaded in the target
VM, start address, the size of the mapping, and the full path of the shared object file are printed. This
is similar to the Solaris pmap utility.
Dumps the Java heap in hprof binary format to filename. The live suboption is optional. If specified,
only the live objects in the heap are dumped. To browse the heap dump, you can use jhat(1) (Java Heap
Analysis Tool) to read the generated file.
Prints information on objects awaiting finalization.
Prints a heap summary. GC algorithm used, heap configuration and generation wise heap usage are printed.
Prints a histogram of the heap. For each Java class, number of objects, memory size in bytes, and fully
qualified class names are printed. VM internal class names are printed with ‘*’ prefix. If the live sub-
option is specified, only live objects are counted.
Prints class loader wise statistics of permanent generation of Java heap. For each class loader, its
name, liveness, address, parent class loader, and the number and size of classes it has loaded are
printed. In addition, the number and size of interned Strings are printed.
supported in this mode.
Prints a help message.
Passes <flag> to the Java virtual machine on which jmap is run.
JAVA自带监控工具的介绍的更多相关文章
- java自带的监控工具VisualVM(二)远程监控
ps:尝试了网上的几个网友提供的方法,始终不得其法,汇总后,终于尝试成功!将一些需要注意的细节也记录下来以后备用! 我们经常需要对我们的开发的软件做各种测试, 软件对系统资源的使用情况更是不可少, 目 ...
- (转载)Java自带的GUI性能监控工具Jconsole以及JisualVM简介
原文链接:http://blog.csdn.net/chendc201/article/details/22905503 1 Jconsole 1.1 简介以及连接 JConsole是一个基于JMX的 ...
- [转] 引用 Java自带的线程池ThreadPoolExecutor详细介绍说明和实例应用
PS: Spring ThreadPoolTaskExecutor vs Java Executorservice cachedthreadpool 引用 [轰隆隆] 的 Java自带的线程池Thre ...
- Java 自带性能监控工具:监视和管理控制台 jconsole 的使用
1. 前言想验证你对 jvm 配的一些调优参数(比如 Xms.Xmx 等)有没有起作用吗?想不想实时监控你自定义的线程池的在实际运行时的线程个数.有没有死锁?应用出现 java.lang.OutOfM ...
- 083 01 Android 零基础入门 02 Java面向对象 01 Java面向对象基础 02 构造方法介绍 02 构造方法-带参构造方法
083 01 Android 零基础入门 02 Java面向对象 01 Java面向对象基础 02 构造方法介绍 02 构造方法-带参构造方法 本文知识点:构造方法-带参构造方法 说明:因为时间紧张, ...
- 常用java自带命令概览
ref:http://www.hollischuang.com/archives/308 一.常用命令 jps: 查看本机的Java中进程信息. jstack: 打印线程的执行栈信息. jmap: 打 ...
- Java 性能分析工具 , 第 2 部分:Java 内置监控工具
引言 本文为 Java 性能分析工具系列文章第二篇,第一篇:操作系统工具.在本文中将介绍如何使用 Java 内置监控工具更加深入的了解 Java 应用程序和 JVM 本身.在 JDK 中有许多内置的工 ...
- java自带工具-jps、jinfo、jstack、jstat、jmap
掌握java自带的这些监控工具,有助与我们很好的分析问题和jvm性能调优秀.收集了些网上整理很好的文章. Java监控工具.调优.调试辅助函数 Java自带的GUI性能监控工具Jconsole以及Ji ...
- Java 代码优化过程的实例介绍
衡量程序的标准 衡量一个程序是否优质,可以从多个角度进行分析.其中,最常见的衡量标准是程序的时间复杂度.空间复杂度,以及代码的可读性.可扩展性.针对程序的时间复杂度和空间复杂度,想要优化程序代码,需要 ...
随机推荐
- c#读取LOG文件并解决读取提示被其他进程占用问题
c# 读写文件时文件正由另一进程使用,因此该进程无法访问该文件,在IO处理上遇到了无法操作的问题. 文件“C:\u_ex.log”正由另一进程使用,因此该进程无法访问该文件. u_ex.log是一个日 ...
- (二)openvpn客户端配置
1)下载和安装openvpn客户端 下载连接:https://build.openvpn.net/downloads/releases/ 注意:这里下载连接使用国内的网已被强,我通过FQ下载 链接:h ...
- 虚拟机Visualbox安装Ubuntu Server
关于虚拟机的新建及设置,请查看<Visualbox安装Ubuntu网络设置> 从光盘启动系统中,首先是选择语言,我这里选择英文 选择英文安装Ubuntu服务器 继续选择英文 选择地理位置, ...
- 计蒜客 1460.Ryuji doesn't want to study-树状数组 or 线段树 (ACM-ICPC 2018 徐州赛区网络预赛 H)
H.Ryuji doesn't want to study 27.34% 1000ms 262144K Ryuji is not a good student, and he doesn't wa ...
- A - Enterprising Escape 【BFS+优先队列+map】
The Enterprise is surrounded by Klingons! Find the escape route that has the quickest exit time, and ...
- HDU 2164(模拟)
Rock, Paper, or Scissors? Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Jav ...
- python——入门系列(一)索引与切片
1.索引和切片:python当中数组的索引和其他语言一样,从0~n-1,使用索引的方法也是中括号,但是python中的切片的使用简化了代码 索引:取出数组s中第3个元素:x=s[2] 切片:用极少的代 ...
- Socket学习总结系列(一) -- IM & Socket
写在准备动手的时候: Socket通讯在iOS中也是很常见,自己最近也一直在学习Telegram这个开源项目,Telegram就是在Socket的基础上做的即时通讯,这个相信了解这个开源项目的也都知道 ...
- Codeforces 361D Levko and Array(二分)(DP)
Levko and Array time limit per test 2 seconds memory limit per test 256 megabytes input standard inp ...
- CentOS7安装bind域名服务
安装Bind Chroot DNS 服务器 yum install bind-chroot bind -y 拷贝bind相关文件,准备bind chroot 环境 cp -R /usr/share/d ...