| 名称 | 主要作用 |
| jps | JVM process Status Tool, 显示指定系统内所有的HotSpot虚拟机进程。通常是本地主机 |
| jstat | JVM Statistics Monitoring Tool,用于收集HotSpot虚拟机各方面的运行数据 |
| jinfo | Configuration Info for java, 显示虚拟机配置信息 |
| jmap | Memory Map for Java, 生成虚拟机的内存存储快照(heapdump文件) |
| jhat | JVM Heap Dump Browser, 用于分析heapdump文件,它建立一个HTTP/HTML服务器,让用户可以在浏览器上查看分析结果 |
| jstack | Stack Trace for Java, 显示虚拟机的线程快照 |
jps [options] [hostId]
[root@localhost ~]# jps -l 3914 org.zhangyoubao.payservice.App 12180 sun.tools.jps.Jps 6913 org.zhangyoubao.userprofiler.App
jstat [option vmid [interval [s|ms] [count]]]
[root@localhost ~]# jstat -gc 6913 S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT 34048.0 34048.0 0.0 3217.8 272640.0 171092.7 683264.0 168910.7 46872.0 28031.2 37857 380.644 69 3.447 384.091
jinfo [option] pid
[root@localhost ~]# jinfo 6913 Attaching to process ID 6913, please wait... Debugger attached successfully. Server compiler detected. JVM version is 24.91-b01 Java System Properties: ... VM Flags: -Xms1000m -Xmx1000m -Dconf=/usr/local/user_profiler/conf -Dserver.root=/usr/local/user_profiler -Dcom.sun.management.jmxremote.port=7003 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseConcMarkSweepGC
jmap [option] vmid
[root@localhost ~]# jmap -histo 6913|head -20 num #instances #bytes class name ---------------------------------------------- 1: 1864966 113459432 [C 2: 201846 49201192 [B 3: 1597065 38329560 java.lang.String 4: 117477 15037056 org.zhangyoubao.thriftdef.UserUsefulInfo 5: 47104 11072048 [I 6: 268631 8596192 java.util.HashMap$Entry 7: 48812 7451760 <constMethodKlass> 8: 100683 6443712 com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty 9: 48812 6257856 <methodKlass> 10: 4230 5271640 <constantPoolKlass> 11: 159491 5103712 java.util.Hashtable$Entry 12: 120226 4809040 org.zhangyoubao.common.cache.adv.Node 13: 127027 4064864 java.util.concurrent.ConcurrentHashMap$HashEntry 14: 230433 3686928 java.lang.Integer 15: 3765 3049824 <constantPoolCacheKlass> 16: 20917 3012048 com.mysql.jdbc.Field 17: 4230 2943840 <instanceKlassKlass>
jmap filename
[root@localhost ~]# jhat html_intercept_server.dump Reading from html_intercept_server.dump... Dump file created Wed Nov 23 13:05:33 CST 2016 Snapshot read, resolving... Resolving 203681 objects... Chasing references, expect 40 dots........................................ Eliminating duplicate references........................................ Snapshot resolved. Started HTTP server on port 7000 Server is ready.
jstack [option] vmid
[root@localhost ~]# jstack 29577|head -20 2016-11-23 12:58:23 Full thread dump OpenJDK Server VM (24.91-b01 mixed mode): "pool-1-thread-7261" prio=10 tid=0x0893a400 nid=0x6b0d waiting on condition [0x652ad000] java.lang.Thread.State: TIMED_WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x75b5b400> (a java.util.concurrent.SynchronousQueue$TransferStack) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226) at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460) at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359) at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) "service_hot_lscs-0" daemon prio=10 tid=0x6982dc00 nid=0x6aeb waiting on condition [0x64ce1000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at org.zhangyoubao.video.client.runner.SimpleVideoRunner.doWork(SimpleVideoRunner.java:150)
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有