常用JVM命令

news2024/12/23 17:25:00

top

展示 进程运行的完整命令行的话可以用 top -c ,当命令行较长无法分辨是哪个程序,可使用键盘右键将窗口不断滑动至右侧查看。

uptime

jps

查看当前正在运行的java进程

执行结果: pid 运行文件

[root@test1 ~]# jps
24001 rs-medical-rpc-service.jar
25602 rs-recure-rpc-service.jar
9122 rs-patient-rpc-service.jar
24836 rs-open-rpc-service.jar
10533 rs-message-rpc-service.jar
8650 rs-all-admin.jar
20395 rs-member-server.jar
1932 rs-member-rpc-service.jar
24140 Jps
26159 rs-report-rpc-service.jar
5935 rs-followup-rpc-service.jar
26448 rs-upms-rpc-service.jar
5267 rs-visit-rpc-service.jar
8052 Bootstrap
3799 jar
27095 rs-education-rpc-service.jar
22936 rs-job-rpc-service.jar
12793 jar
25881 rs-register-rpc-service.jar
23708 rs-external-rpc-service.jar
7997 Bootstrap
13055 QuorumPeerMain
25183 rs-oss-rpc-service.jar
[root@test1 ~]# jps -l
24001 /opt/rs-medical-rpc-service/rs-medical-rpc-service.jar
25602 /opt/rs-recure-rpc-service/rs-recure-rpc-service.jar
9122 /opt/rs-patient-rpc-service/rs-patient-rpc-service.jar
24836 /opt/rs-open-rpc-service/rs-open-rpc-service.jar
10533 /opt/rs-message-rpc-service/rs-message-rpc-service.jar
8650 /opt/rs-all-admin/rs-all-admin.jar
20395 /opt/rs-member-server/rs-member-server.jar
1932 /opt/rs-member-rpc-service/rs-member-rpc-service.jar
26159 /opt/rs-report-rpc-service/rs-report-rpc-service.jar
5935 /opt/rs-followup-rpc-service/rs-followup-rpc-service.jar
26448 /opt/rs-upms-rpc-service/rs-upms-rpc-service.jar
5267 /opt/rs-visit-rpc-service/rs-visit-rpc-service.jar
8052 org.apache.catalina.startup.Bootstrap
3799 spring-boot-admin-0.0.1-SNAPSHOT.jar
27095 /opt/rs-education-rpc-service/rs-education-rpc-service.jar
22936 /opt/rs-job-rpc-service/rs-job-rpc-service.jar
12793 xxl-job-admin-2.1.2.jar
25881 /opt/rs-register-rpc-service/rs-register-rpc-service.jar
23708 /opt/rs-external-rpc-service/rs-external-rpc-service.jar
7997 org.apache.catalina.startup.Bootstrap
24189 sun.tools.jps.Jps
13055 org.apache.zookeeper.server.quorum.QuorumPeerMain
25183 /opt/rs-oss-rpc-service/rs-oss-rpc-service.jar
[root@test1 ~]# 

jstat

jstat -<option> [-t] [-h<lines>] <vmid> [<interval> [<count>]]
[root@test1 ~]# jstat -gc 25183
 S0C    S1C    S0U    S1U      EC       EU        OC         OU       MC     MU    CCSC   CCSU   YGC     YGCT    FGC    FGCT     GCT   
26176.0 26176.0 662.4   0.0   209792.0 15089.7   786432.0   58931.7   97168.0 92924.0 11688.0 10872.9    306   11.508   6      0.106   11.614
[root@test1 ~]# jstat -gcutil 25183
 S0 		S1 		E 		O 		P 			YGC 	YGCT 		FGC 	FGCT 	 GCT
0.00   0.00  6.20  41.42  47.20   16 		0.105   3 		0.472  0.577

这台服务器的新生代Eden区(E,表示Eden)使用了6.2%的空间,2个Survivor区 (S0、S1,表示Survivor0、Survivor1)里面都是空的,老年代(O,表示Old)和永久代(P,表示 Permanent)则分别使用了41.42%和47.20%的空间。程序运行以来共发生Minor GC(YGC,表示Young GC)16次,总耗时0.105秒;发生Full GC(FGC,表示Full GC)3次,总耗时(FGCT,表示Full GC Time)为0.472秒;所有GC总耗时(GCT,表示GC Time)为0.577秒。

jinfo

jinfo(Configuration Info for Java)的作用是实时查看和调整虚拟机各项参数。

[root@test1 ~]# jinfo 25183
Attaching to process ID 25183, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.322-b06
Java System Properties:

java.runtime.name = OpenJDK Runtime Environment
java.vm.version = 25.322-b06
sun.boot.library.path = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/amd64
java.protocol.handler.pkgs = org.springframework.boot.loader
java.vendor.url = https://www.redhat.com/
java.vm.vendor = Red Hat, Inc.
path.separator = :
file.encoding.pkg = sun.io
java.vm.name = OpenJDK 64-Bit Server VM
sun.os.patch.level = unknown
sun.java.launcher = SUN_STANDARD
user.country = CN
user.dir = /root
java.vm.specification.name = Java Virtual Machine Specification
PID = 25183
java.runtime.version = 1.8.0_322-b06
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
os.arch = amd64
java.endorsed.dirs = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/endorsed
line.separator = 

java.io.tmpdir = /tmp
java.vm.specification.vendor = Oracle Corporation
os.name = Linux
spring.config.location = /opt/rs-oss-rpc-service/conf/application.properties
sun.jnu.encoding = UTF-8
java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
spring.beaninfo.ignore = true
sun.nio.ch.bugLevel = 
java.specification.name = Java Platform API Specification
java.class.version = 52.0
java.net.preferIPv4Stack = true
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
os.version = 3.10.0-957.el7.x86_64
LOG_FILE = /root/logs/@artifactId@.log
user.home = /root
user.timezone = Asia/Shanghai
catalina.useNaming = false
java.awt.printerjob = sun.print.PSPrinterJob
file.encoding = UTF-8
java.specification.version = 1.8
catalina.home = /tmp/tomcat.378295779052555567.8205
user.name = root
java.class.path = /opt/rs-oss-rpc-service/rs-oss-rpc-service.jar
java.vm.specification.version = 1.8
sun.arch.data.model = 64
sun.java.command = /opt/rs-oss-rpc-service/rs-oss-rpc-service.jar
java.home = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre
user.language = zh
java.specification.vendor = Oracle Corporation
org.apache.logging.log4j.assignedSequences = 4441
awt.toolkit = sun.awt.X11.XToolkit
java.vm.info = mixed mode
java.version = 1.8.0_322
java.ext.dirs = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/ext:/usr/java/packages/lib/ext
sun.boot.class.path = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/classes
java.awt.headless = true
java.vendor = Red Hat, Inc.
catalina.base = /tmp/tomcat.378295779052555567.8205
file.separator = /
java.vendor.url.bug = https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%207&component=java-1.8.0-openjdk
sun.io.unicode.encoding = UnicodeLittle
sun.cpu.endian = little
sun.cpu.isalist = 

VM Flags:
Non-default VM flags: -XX:CICompilerCount=12 -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:+DisableExplicitGC -XX:InitialHeapSize=1073741824 -XX:LargePageSizeInBytes=134217728 -XX:MaxHeapSize=1073741824 -XX:MaxNewSize=268435456 -XX:MaxTenuringThreshold=6 -XX:MinHeapDeltaBytes=196608 -XX:NewSize=268435456 -XX:OldPLABSize=16 -XX:OldSize=805306368 -XX:ThreadStackSize=256 -XX:+UseCMSCompactAtFullCollection -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseFastAccessorMethods -XX:+UseFastUnorderedTimeStamps -XX:+UseParNewGC 
Command line:  -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Xmx1g -Xms1g -Xmn256m -XX:PermSize=128m -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Dspring.config.location=/opt/rs-oss-rpc-service/conf/application.properties

jstack

jstack(Stack Trace for Java)命令用于生成虚拟机当前时刻的线程快照(一般称为threaddump或者 javacore文件)。线程快照就是当前虚拟机内每一条线程正在执行的方法堆栈的集合,生成线程快照的

目的通常是定位线程出现长时间停顿的原因,如线程间死锁、死循环、请求外部资源导致的长时间挂

起等,都是导致线程长时间停顿的常见原因。线程出现停顿时通过jstack来查看各个线程的调用堆栈,

就可以获知没有响应的线程到底在后台做些什么事情,或者等待着什么资源。

# jstack -l pid   -l 除堆栈信息外显示关于锁的附加信息
"Druid-ConnectionPool-Create-1534755892" #32 daemon prio=5 os_prio=0 tid=0x00007f4cb98f5000 nid=0x6384 waiting on condition [0x00007f4c400cf000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000000d12778b8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2728)

   Locked ownable synchronizers:
	- None

"Druid-ConnectionPool-Destroy-380812044" #31 daemon prio=5 os_prio=0 tid=0x00007f4cb8f9a000 nid=0x6383 waiting on condition [0x00007f4c40110000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(Native Method)
	at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:2824)

   Locked ownable synchronizers:
	- None

"Druid-ConnectionPool-Create-380812044" #30 daemon prio=5 os_prio=0 tid=0x00007f4cb8c87000 nid=0x6382 waiting on condition [0x00007f4c40151000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000000d14761f8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2728)

   Locked ownable synchronizers:
	- None

"mysql-cj-abandoned-connection-cleanup" #29 daemon prio=5 os_prio=0 tid=0x00007f4cb9882000 nid=0x6380 in Object.wait() [0x00007f4c40192000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
	- locked <0x00000000d1760620> (a java.lang.ref.ReferenceQueue$Lock)
	at com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:85)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

   Locked ownable synchronizers:
	- <0x00000000d16d1078> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"Statistics Thread-__DEFAULT__-1" #27 daemon prio=5 os_prio=0 tid=0x00007f4cb84dd800 nid=0x6378 waiting on condition [0x00007f4c401d3000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000000d146b0d8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

   Locked ownable synchronizers:
	- None

"rs-oss-rpc-service.data" #26 prio=5 os_prio=0 tid=0x00007f4cb9428000 nid=0x6377 waiting on condition [0x00007f4c41496000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000000d1464758> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

   Locked ownable synchronizers:
	- None

"__DEFAULT__" #25 daemon prio=5 os_prio=0 tid=0x00007f4cb91c2000 nid=0x6376 in Object.wait() [0x00007f4c41055000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000000d1412140> (a java.util.TaskQueue)
	at java.lang.Object.wait(Object.java:502)
	at java.util.TimerThread.mainLoop(Timer.java:526)
	- locked <0x00000000d1412140> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:505)

   Locked ownable synchronizers:
	- None

"Log4j2-TF-4-Scheduled-2" #22 daemon prio=5 os_prio=0 tid=0x00007f4cb84e0000 nid=0x6323 waiting on condition [0x00007f4c40c14000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000000d07034a8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

   Locked ownable synchronizers:
	- None

"Service Thread" #18 daemon prio=9 os_prio=0 tid=0x00007f4cb838b800 nid=0x628c runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C1 CompilerThread11" #17 daemon prio=9 os_prio=0 tid=0x00007f4cb8388000 nid=0x628b runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C1 CompilerThread10" #16 daemon prio=9 os_prio=0 tid=0x00007f4cb8386000 nid=0x628a waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C1 CompilerThread9" #15 daemon prio=9 os_prio=0 tid=0x00007f4cb8384000 nid=0x6289 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C1 CompilerThread8" #14 daemon prio=9 os_prio=0 tid=0x00007f4cb8381000 nid=0x6288 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C2 CompilerThread7" #13 daemon prio=9 os_prio=0 tid=0x00007f4cb837e800 nid=0x6287 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C2 CompilerThread6" #12 daemon prio=9 os_prio=0 tid=0x00007f4cb837c800 nid=0x6286 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C2 CompilerThread5" #11 daemon prio=9 os_prio=0 tid=0x00007f4cb837a000 nid=0x6285 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C2 CompilerThread4" #10 daemon prio=9 os_prio=0 tid=0x00007f4cb8378000 nid=0x6284 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C2 CompilerThread3" #9 daemon prio=9 os_prio=0 tid=0x00007f4cb8375800 nid=0x6283 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C2 CompilerThread2" #8 daemon prio=9 os_prio=0 tid=0x00007f4cb836b000 nid=0x6282 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C2 CompilerThread1" #7 daemon prio=9 os_prio=0 tid=0x00007f4cb8369000 nid=0x6281 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C2 CompilerThread0" #6 daemon prio=9 os_prio=0 tid=0x00007f4cb8366800 nid=0x6280 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"Signal Dispatcher" #5 daemon prio=9 os_prio=0 tid=0x00007f4cb8358800 nid=0x627f runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"Surrogate Locker Thread (Concurrent GC)" #4 daemon prio=9 os_prio=0 tid=0x00007f4cb8356800 nid=0x627e waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007f4cb832a800 nid=0x627c in Object.wait() [0x00007f4ca0e85000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
	- locked <0x00000000d00218a8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)

   Locked ownable synchronizers:
	- None

"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007f4cb8326000 nid=0x627b in Object.wait() [0x00007f4ca0ec6000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
	- locked <0x00000000d00291d0> (a java.lang.ref.Reference$Lock)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)

   Locked ownable synchronizers:
	- None

"VM Thread" os_prio=0 tid=0x00007f4cb831c000 nid=0x627a runnable 

"Gang worker#0 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb805a800 nid=0x6268 runnable 

"Gang worker#1 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb805c800 nid=0x6269 runnable 

"Gang worker#2 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb805e000 nid=0x626a runnable 

"Gang worker#3 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb8060000 nid=0x626b runnable 

"Gang worker#4 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb8062000 nid=0x626c runnable 

"Gang worker#5 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb8064000 nid=0x626d runnable 

"Gang worker#6 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb8065800 nid=0x626e runnable 

"Gang worker#7 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb8067800 nid=0x626f runnable 

"Gang worker#8 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb8069800 nid=0x6270 runnable 

"Gang worker#9 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb806b800 nid=0x6271 runnable 

"Gang worker#10 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb806d000 nid=0x6272 runnable 

"Gang worker#11 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb806f000 nid=0x6273 runnable 

"Gang worker#12 (Parallel GC Threads)" os_prio=0 tid=0x00007f4cb8071000 nid=0x6274 runnable 

"Concurrent Mark-Sweep GC Thread" os_prio=0 tid=0x00007f4cb811c800 nid=0x6279 runnable 

"Gang worker#0 (Parallel CMS Threads)" os_prio=0 tid=0x00007f4cb8114000 nid=0x6275 runnable 

"Gang worker#1 (Parallel CMS Threads)" os_prio=0 tid=0x00007f4cb8115800 nid=0x6276 runnable 

"Gang worker#2 (Parallel CMS Threads)" os_prio=0 tid=0x00007f4cb8117800 nid=0x6277 runnable 

"Gang worker#3 (Parallel CMS Threads)" os_prio=0 tid=0x00007f4cb8119800 nid=0x6278 runnable 

"VM Periodic Task Thread" os_prio=0 tid=0x00007f4cb838d800 nid=0x628d waiting on condition 

JNI global references: 1925

jmap

jmap(Memory Map for Java)命令用于生成堆转储快照(一般称为heapdump或dump文件)。

# jmap pid
# jmap -dump:format=b,file=yourfilename.bin 3500   
#			-dump 用于生成堆栈转存储快照,format=b指定格式化,file中定义自己的文件名  3500表示当前进程id
[root@test1 ~]# jmap 25183
Attaching to process ID 25183, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.322-b06
0x000055bb71638000	8K	/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/bin/java
0x00007f4bf9ed8000	123K	/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/amd64/libsunec.so
0x00007f4c41898000	153K	/usr/lib64/liblzma.so.5.2.2
0x00007f4c7000a000	66K	/usr/lib64/libbz2.so.1.0.6
0x00007f4c7021a000	97K	/usr/lib64/libelf-0.172.so
0x00007f4c70432000	19K	/usr/lib64/libattr.so.1.1.0
0x00007f4c70637000	322K	/usr/lib64/libdw-0.172.so
0x00007f4c70886000	19K	/usr/lib64/libcap.so.2.22
0x00007f4c70a8b000	84K	/usr/lib64/libnss_myhostname.so.2
0x00007f4c70ca0000	107K	/usr/lib64/libresolv-2.17.so
0x00007f4c70eba000	30K	/usr/lib64/libnss_dns-2.17.so
0x00007f4c710c1000	51K	/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/amd64/libmanagement.so
0x00007f4c712cb000	121K	/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/amd64/libnet.so
0x00007f4c714e4000	97K	/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/amd64/libnio.so
0x00007f4cbc07c000	43K	/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/amd64/libzip.so
0x00007f4cbc285000	60K	/usr/lib64/libnss_files-2.17.so
0x00007f4cbc498000	214K	/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/amd64/libjava.so
0x00007f4cbc6c4000	64K	/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/amd64/libverify.so
0x00007f4cbc8d3000	42K	/usr/lib64/librt-2.17.so
0x00007f4cbcadb000	86K	/usr/lib64/libgcc_s-4.8.5-20150702.so.1
0x00007f4cbccf1000	1110K	/usr/lib64/libm-2.17.so
0x00007f4cbcff3000	968K	/usr/lib64/libstdc++.so.6.0.19
0x00007f4cbd2fa000	17660K	/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/amd64/server/libjvm.so
0x00007f4cbe3a5000	2106K	/usr/lib64/libc-2.17.so
0x00007f4cbe773000	18K	/usr/lib64/libdl-2.17.so
0x00007f4cbe977000	69K	/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/amd64/jli/libjli.so
0x00007f4cbeb86000	88K	/usr/lib64/libz.so.1.2.7
0x00007f4cbed9c000	138K	/usr/lib64/libpthread-2.17.so
0x00007f4cbefb8000	159K	/usr/lib64/ld-2.17.so

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/648916.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

第六期:链表回文旋转的秘密

文章目录 1. 反转链表2. 回文链表代码1. 反转链表2. 回文链表 PS&#xff1a;每道题解题方法不唯一&#xff0c;欢迎讨论&#xff01;每道题后都有解析帮助你分析做题&#xff0c;答案在最下面&#xff0c;关注博主每天持续更新。 1. 反转链表 题目描述&#xff1a; 给你单链表…

九、会话控制——cookie、session、token

文章目录 前言一、cookie1.1 cookie 是什么1.2 cookie 的特点1.3 cookie 的运行流程1.4 express 框架中设置cookie1.5 express 框架中删除cookie1.6 express 框架中获取cookie 二、session2.1 session 是什么2.2 session 的作用2.3 session 的运行流程2.4 session 和 cookie 的…

vue框架一

目录 友情提醒第一章、vue框架是前端js框架1.1&#xff09;介绍vue1.2&#xff09;vue设计思想1.3&#xff09;vue引入 第二章、实现的步骤2.1&#xff09;创建步骤2.2&#xff09;基本语法2.3&#xff09; 第三章、遇到的问题3.1&#xff09;3.2&#xff09;3.3&#xff09; 第…

python grpc状态码用法

测试代码 新建demo.proto文件定义协议缓冲区&#xff0c;写入以下内容&#xff1a; syntax "proto3"; package server;service Demo {rpc ping(Request) returns (Response) {} }message Request {string msg 1;} message Response {string msg 1;}使用gRPC的工…

百兆网和千兆网怎么接线

一、认识网线 网线&#xff1a;橙色和白橙交织在一起&#xff0c;绿色和白绿交织在一起&#xff0c;棕色和白棕交织在一起&#xff0c;蓝色和白蓝交织在一起。在传输电信号时&#xff0c;相互之间辐射出的电磁波会相互抵消&#xff0c;可以消除相互之间的干扰&#xff0c;所以…

shell脚本进阶1——精读ansible+shell脚本

文章目录 一、脚本规划思路二、主控机shell脚本2.1 脚本输出字体特效2.2 生成菜单栏对话框2.3 配置本地yum源仓库2.4 配置受控机yum源2.5 关闭防火墙和selinux2.6 把docker安装包给受控机2.7 安装docker-compose2.8 安装docker2.9 安装ansible2.10 安装pip2.11 主控本机免密登录…

JAVA并发十二连招

1、HashMap 面试第一题必问的 HashMap&#xff0c;挺考验Javaer的基础功底的&#xff0c;别问为啥放在这&#xff0c;因为重要&#xff01;HashMap具有如下特性&#xff1a; HashMap 的存取是没有顺序的。 KV 均允许为 NULL。 多线程情况下该类安全&#xff0c;可以考虑用 Ha…

JavaFx Shape形状

JavaFx Shape形状 1、相关子类2、屏幕坐标系3、JavaFx SVG矢量图4、Polygon箭头形状 javafx.scene.shape.Shape 1、相关子类 javafx.scene.shape.Linew3cschool JavaFX 线javafx.scene.shape.Rectanglew3cschool JavaFX 矩形椭圆javafx.scene.shape.Ellipsejavafx.scene.shap…

开源办公套件 ONLYOFFICE文档7.4新功能

随着现代办公的信息化发展&#xff0c;我们处理文档时&#xff0c;对在线协作的需求也越来越大。选择一款简单高效、免费又无广告弹窗的办公套件便非常重要。除了昂贵的微软Office&#xff0c;太多广告的WPS&#xff0c;你还有另一个选择&#xff1a;ONLYOFFICE。 什么是 ONLY…

论程序员提问的艺术

最近工作比较忙&#xff0c;加上空闲时间大部分都是在维护开发【云狗AI】&#xff0c;所以也有一段时间没更新视频了&#xff0c;有不懂的&#xff0c;也可以问一下【云狗AI】以后我也会花更多的时间在维护这个项目中。争取给大家带来更好的体验。 主要是因为最近没发现什么特…

播放WebRTC开源库回调出来的视频码流时遇到的内存越界问题排查

目录 1、执行memset操作时遇到了内存访问违例&#xff0c;导致程序崩溃 2、查看崩溃时的函数调用堆栈&#xff0c;初步怀疑是memset时有内存越界 3、存放YUV数据的buffer在执行若干操作后出现内存越界 4、加载系统库的pdb之后&#xff0c;看到了更多的函数调用堆栈&…

代码随想录二刷 day23 | 二叉树 之 669. 修剪二叉搜索树 108.将有序数组转换为二叉搜索树 538.把二叉搜索树转换为累加树

二刷day23 669. 修剪二叉搜索树108.将有序数组转换为二叉搜索树538.把二叉搜索树转换为累加树 669. 修剪二叉搜索树 题目链接 解题思路&#xff1a; 递归三部曲 确定递归函数的参数以及返回值 这里我们为什么需要返回值呢&#xff1f; 因为是要遍历整棵树&#xff0c;做修改…

SOLIDWORKS Electrical如何绘制电线

SOLIDWORKS Electrical 是一套计算机辅助工程 (CAE) 设计工具&#xff0c;他可以帮助电气设计工程师减少创新的内在风险&#xff0c;并允许公司减少对物理原型的需求&#xff0c;从而在更短时间内以更低成本将产品推向市场。通过一组强大、直观的电气设计功能&#xff0c;设计人…

互联网大佬们的成功绝非偶然

以下排名不分先后。 一、百度李彦宏 &#xff0c;1987年阳泉市高考状元&#xff0c;考进北大。 互联网三巨头BAT的第一个字母&#xff0c;指的就是百度。创始人李彦宏是出生在普通家庭出生&#xff0c;他小时候的启蒙教育由三个姐姐负责&#xff0c;不过相比学习&#xff0c;更…

详解国产指纹芯片的工作原理以及应用领域

指纹芯片&#xff0c;是指内嵌指纹识别技术的芯片产品&#xff0c;能够片上实现指纹的图像采集、特征提取、特征比对的芯片&#xff0c;开发者可以方便的实现指纹识别的功能&#xff0c;大大降低了指纹识别行业的门槛&#xff0c;对指纹识别的推广具有十分积极的推动作用。 近几…

数据合规之监管关注要点暨风险防范建议

上市申报过程中证券监督部门最关注的三类问题为数据源合规、数据安全及数据使用合规&#xff0c;而这三类问题也是企业运营时最容易产生的问题&#xff0c;它们无疑应是拟上市企业数据合规治理的重中之重&#xff1a; 1、数据源合规之监管关注要点 1、数据信息 就获取的个人数…

RaaS(勒索软件即服务)是什么?这个模型是如何工作的?

Ransomware as a Service是一个英语术语,指的是一种商业模型&#xff0c;其中勒索软件开发者向感兴趣的恶意行为者提供工具&#xff0c;以便他们可以发起勒索软件攻击。使用者通过签约创建恶意软件即服务或加入联盟计划&#xff0c;并分发一系列勒索软件以换取一定比例的利润。…

字符串--字符串处理函数、向函数传递字符串

一、字符串处理函数 字符串处理函数库提供了很多有用的函数用于字符串处理操作&#xff08;如复制字符串和拼接字符串等&#xff09;以及确定字符串的长度。若要使用这些字符串处理函数&#xff0c;必须在程序的开头将头文件<string.h>包含到源头文件。 例题1&#xff1a…

什么是Vue的前端微服务架构(Micro Frontends)?

什么是Vue的前端微服务架构&#xff08;Micro Frontends&#xff09;&#xff1f; 前端微服务架构&#xff08;Micro Frontends&#xff09;是一种新型的前端架构风格&#xff0c;它借鉴了后端微服务架构的思想&#xff0c;将前端应用程序拆分为多个小型、独立的部分&#xff…

系统学习Spring,阿里最新产Spring全家桶进阶笔记真的很全

Spring是我们Java程序员面试和工作都绕不开的重难点。很多粉丝就经常跟我反馈说由Spring衍生出来的一系列框架太多了&#xff0c;根本不知道从何下手&#xff1b;大家学习过程中大都不成体系&#xff0c;但面试的时候都上升到源码级别了&#xff0c;你不光要清楚了解Spring源码…