常用JVM命令

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

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

DBeaver连接SQLite数据库

一、前言 SQLite小巧轻便的开源免费关系型数据库&#xff0c;适合嵌入单机应用随身携带。桌面版推荐使用DBeaver。 官网&#xff1a;SQLite Download Page github&#xff1a;GitHub - sqlite/sqlite: Official Git mirror of the SQLite source tree 类似的开源免费且小巧…

WebGL前言——WebGL相关介绍

第一讲内容主要介绍WebGL技术和相应的硬件基础部分&#xff0c;在初级课程和中级课程的基础上&#xff0c;将技术和硬件基础进行串联&#xff0c;能够对WebGL从产生到消亡有深刻全面的理解。同时还介绍WebGL大家在初级课程和中级课程中的一些常见错误以及错误调试的办法。 1.1…

Jmeter常用参数化技巧总结!

说起接口测试&#xff0c;相信大家在工作中用的最多的还是Jmeter。 JMeter是一个100&#xff05;的纯Java桌面应用&#xff0c;由Apache组织的开放源代码项目&#xff0c;它是功能和性能测试的工具。具有高可扩展性、支持Web(HTTP/HTTPS)、SOAP、FTP、JAVA 等多种协议。 在做…

Shell脚本文本三剑客之sed编辑器

目录 一、sed编辑器简介 二、sed工作流程 三、sed命令 四、sed命令的使用 1.sed打印文件内容&#xff08;p&#xff09; &#xff08;1&#xff09;打印文件所有行 &#xff08;2&#xff09;打印文件指定行 2.sed增加、插入、替换行&#xff08;a、i、c&#xff09; …

Git工作流(随笔)

目录 前言 一、工作流概述 1、概念 2、分类 二、集中式工作流 1、概述 2、介绍 3、操作过程 三、功能分支工作流 1、概述 2、介绍 3、操作过程 1&#xff09;创建远程分支 2&#xff09;删除远程分支 四、GitFlow工作流 1、概述 2、介绍 3、操作过程 五、Forki…

管理类联考——英语二——知识篇——写作——题目说明——A节

MBA&#xff0c;MPA&#xff0c;MPAcc管理类联考英语写作部分由A&#xff0c;B两节组成&#xff0c;主要考查考生的书面表达能力。共2题&#xff0c;25分。A节要求考生根据所给情景写出约100词(标点符号不计算在内)的应用文&#xff0c;包括私人和公务信函、通知、备忘录等。共…

Get请求参数过多导致请求失败

1. 问题 系统正常使用没有问题&#xff0c;但是有极个别的用户出现系统异常&#xff0c;通过日志发现某个get请求&#xff0c;传入的城市list太多&#xff0c;就会抛出异常 java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map。 2. 排查过程 …

Vue中如何进行游戏开发与游戏引擎集成?

Vue中如何进行游戏开发与游戏引擎集成&#xff1f; Vue.js是一款流行的JavaScript框架&#xff0c;它的MVVM模式和组件化开发思想非常适合构建Web应用程序。但是&#xff0c;如果我们想要开发Web游戏&#xff0c;Vue.js并不是最合适的选择。在本文中&#xff0c;我们将介绍如何…

【java】使用 BeanUtils.copyProperties 11个坑(注意事项)

文章目录 背景第1个坑&#xff1a; 类型不匹配第2个坑: BeanUtils.copyProperties是浅拷贝第3个坑&#xff1a;属性名称不一致第4个坑&#xff1a;Null 值覆盖第5个坑&#xff1a;注意引入的包第6个坑&#xff1a;Boolean类型数据is属性开头的坑第7个坑&#xff1a;查找不到字段…

【鲁棒优化】具有可再生能源和储能的区域微电网的最优运行:针对不确定性的鲁棒性和非预测性解决方案(Matlab代码实现)

&#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5; &#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜密&#xff0c;逻辑清晰&#xff0c;为了方便读者。 ⛳️座右铭&a…

景区旅游多商户版小程序v14.3.1+前端

&#x1f388; 限时活动领体验会员&#xff1a;可下载程序网创项目短视频素材 &#x1f388; &#x1f389; 有需要的朋友记得关赞评&#xff0c;文章底部来交流&#xff01;&#xff01;&#xff01; &#x1f389; ✨ 源码介绍 【新增】全新授权登录支持取消登录 【新增】商…

无需租云服务器,Linux本地搭建web服务,并内网穿透发布公网访问

文章目录 前言1. 本地搭建web站点2. 测试局域网访问3. 公开本地web网站3.1 安装cpolar内网穿透3.2 创建http隧道&#xff0c;指向本地80端口3.3 配置后台服务 4. 配置固定二级子域名5. 测试使用固定二级子域名访问本地web站点 转载自cpolar文章&#xff1a;Linux CentOS本地搭建…

saltstack草稿

salt [options] <target> <module.function> [arguments] salt的自建函数&#xff1a; salt * test.rand_sleep 120 salt/salt/modules/test.py 这个是salt自带的包 salt * disk.usage salt -G ipv4:192.168.50.12 cmd.run ls -l /home salt * grain…

C语言之动态内存分配(1)

目录 本章重点 为什么存在动态内存分配 动态内存函数的介绍 malloc free calloc realloc 常见的动态内存错误 几个经典的笔试题 柔性数组 动态内存管理—自己维护自己的内存空间的大小 首先我们申请一个变量&#xff0c;再申请一个数组 这是我们目前知道的向内存申请…

Spark大数据处理学习笔记1.4 掌握Scala运算符

文章目录 一、学习目标二、运算符等价于方法&#xff08;一&#xff09;运算符即方法&#xff08;二&#xff09;方法即运算符1、单参方法2、多参方法3、无参方法 三、Scala运算符&#xff08;一&#xff09;运算符分类表&#xff08;二&#xff09;Scala与Java运算符比较 四、…

基于prefix tuning + Bert的标题党分类器

文章目录 背景一、Prefix-Tuning介绍二、分类三、效果四、参阅 背景 近期, CSDN博客推荐流的标题党博客又多了起来, 先前的基于TextCNN版本的分类模型在语义理解上能力有限, 于是, 便使用的更大的模型来优化, 最终准确率达到了93.7%, 还不错吧. 一、Prefix-Tuning介绍 传统的…

搭建TiDB负载均衡环境-LVS+KeepAlived实践

作者&#xff1a; 我是咖啡哥 原文来源&#xff1a; https://tidb.net/blog/f614b200 昨天&#xff0c;发了一篇使用HAproxyKP搭建TiDB负载均衡环境的文章&#xff0c;今天我们再用LVSKP来做个实验。 环境信息 TiDB版本&#xff1a;V7.1.0 haproxy版本&#xff1a;2.6.2 …

Linux环境下的工具(yum,gdb,vim)

一&#xff0c;yum yum其实是linux环境下的一种应用商店&#xff0c;主要用centos等版本。它也有三板斧&#xff1a;yum list,yum remove,yum install。当然不是说他只有这三个命令&#xff0c;还有yum search等等。在这直说以上三个。 yum list其实是查看你所能安装的软件包…

13.常用类|Java学习笔记

文章目录 包装类包装类型和String类型的相互转换Integer类和Character类的常用方法Integer创建机制&面试题 String类创建String对象的两种方式和区别字符串的特性String类的常用方法 StringBuffer类String和StringBuffer相互转换StringBuffer常用方法 StringBuilder类Strin…

安卓手机使用Termux搭建Hexo个人博客网站【内网穿透公网访问】

文章目录 1. 安装 Hexo2. 安装cpolar内网穿透3. 公网远程访问4. 固定公网地址 转载自cpolar极点云的文章&#xff1a;安卓手机使用Termux搭建Hexo个人博客网站【内网穿透公网访问】 Hexo 是一个用 Nodejs 编写的快速、简洁且高效的博客框架。Hexo 使用 Markdown 解析文章&#…