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#获取屏幕大小或任务栏大小
C#获取屏幕大小或任务栏大小http://www.cnblogs.com/chlyzone/archive/2012/11/05/2754601.html
- Nodejs微信开发使用wechat-api回复多条消息
在上一往篇文章<Nodejs微信开发>中,微信后台能够正常的接收到客户端的消息,并能够简单的回复一条消息至客户端. 但我的目录是将微信与Bot Framework进行关联,那么肯定就有一些 ...
- POJ 3237.Tree -树链剖分(边权)(边值更新、路径边权最值、区间标记)贴个板子备忘
Tree Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 12247 Accepted: 3151 Descriptio ...
- flutter 修改anroid默认example包名
- JVM加载Class文件的机制
1.Java中的所有类,必须被装载到jvm中才能运行,这个装载工作是由jvm中的类装载器完成的, 类装载器所做的工作实质是把类文件从硬盘读取到内存中 2.java中的类大致分为三种: 1.系统 ...
- POJ 1113 Wall(凸包)
[题目链接] http://poj.org/problem?id=1113 [题目大意] 给出一个城堡,要求求出距城堡距离大于L的地方建围墙将城堡围起来求所要围墙的长度 [题解] 画图易得答案为凸包的 ...
- [BZOJ2226]LCMSum
转化一下,$\sum\limits_{i=1}^n[i,n]=n\sum\limits_{i=1}^n\dfrac i{(i,n)}$ 枚举$d=(i,n)$,上式变为$n\sum\limits_{d ...
- 【树链剖分】【树状数组】【最近公共祖先】【块状树】bzoj3631 [JLOI2014]松鼠的新家
裸题,树状数组区间修改+单点查询.当然要稍微讨论一下链的左右端点是否修改的情况咯. #include<cstdio> #include<algorithm> #include& ...
- 3.4常用类(java学习笔记)Math和Random
一.Math 这个类包含执行指数.对数.平方根法.三角函数等基本的数字运算. Math中还包含一些静态常量供我们调用. 如PI圆周率,E. 1.abs(),返回该数的绝对值. public class ...
- STL之vector4
描述 将一个n行m列矩阵元素输入存储后并输出. 部分代码已经给出,请补充完整,提交时请勿包含已经给出的代码. int main() { vector< vector<int> > ...