An error is reported when the jstack command is executed. The error is as follows
~ jstack 28604
28604: Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding
This may indicate that the 28604
process was not started by this user
Through the PS command, you can view the process, and then switch to this user
Switch to the/tmp directory to find out if this user has a hsperfdata_ User name
directory
Enter the directory to see if there is a jstack execution process number. If there is, you can directly use jstack PID
to execute. If not, don’t waste time. It’s not going to work. May report not permitted
or the above error
~ jstack 13179 | more
2019-06-13 17:15:44
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode):
"Attach Listener" #137 daemon prio=9 os_prio=0 tid=0x00002b7b64001000 nid=0x3db4 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Windows IOHub Watcher for IOHub#1: Selector[keys:0, gen:0]/Computer.threadPoolForRemoting [#4]" #90 daemon prio=5 os_prio=0 tid=0x00002b7bc00f7800 nid=0x340c in Object.wait() [0x00002b7c
1c402000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at org.jenkinsci.remoting.protocol.IOHub$IOHubSelectorWatcher.run(IOHub.java:549)
- locked <0x00000007a8e31928> (a java.lang.Object)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
"IOHub#1: Selector[keys:0, gen:0]/Computer.threadPoolForRemoting [#3]" #89 daemon prio=5 os_prio=0 tid=0x00002b7bc00f6000 nid=0x340b runnable [0x00002b7c1cf0d000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
...........................
Then view the JC information through jstat - gcutil PID interval (MS)
jstat -gcutil 13179 1000
S0 S1 E O M CCS YGC YGCT FGC FGCT GCT
99.95 0.00 49.14 14.96 91.97 84.24 10 0.444 3 0.317 0.761
99.95 0.00 49.14 14.96 91.97 84.24 10 0.444 3 0.317 0.761
99.95 0.00 49.14 14.96 91.97 84.24 10 0.444 3 0.317 0.761
99.95 0.00 49.14 14.96 91.97 84.24 10 0.444 3 0.317 0.761
99.95 0.00 49.14 14.96 91.97 84.24 10 0.444 3 0.317 0.761
99.95 0.00 49.14 14.96 91.97 84.24 10 0.444 3 0.317 0.761
99.95 0.00 49.14 14.96 91.97 84.24 10 0.444 3 0.317 0.761
99.95 0.00 49.14 14.96 91.97 84.24 10 0.444 3 0.317 0.761
.........
Among them: S0: percentage of capacity occupied by the first survivor of the young generation
S1: the percentage of used capacity in the second survivor of the young generation
E: Percentage of capacity used by young Eden
O: Percentage of used capacity in old years
P: Percentage of capacity occupied by perm generation (JDK7 -)
M: Percentage of meta space usage capacity (jdk8 +)
CCS: compression usage ratio
YGC: the number of young generation GC from application startup to current sampling
Ygct: the time from application startup to current sampling
FGC: the number of GC in the old age from application startup to current sampling
Fgct: time from application startup to current sampling
GCT: total GC time from application startup to current sampling