java|Java内存过高问题排查

1、使用命令:top 查看当前进程的状态
java|Java内存过高问题排查
文章图片

2、从上图可以看到PID:916的java进程占用内存较大。定位线程问题(通过命令查看PID 为25894 进程的线程情况),命令:# ps p 916 -L -o pcpu,pmem,pid,tid,time,tname,cmd
java|Java内存过高问题排查
文章图片


由此可以看到这PID:916的进程产生了很多线程。接下来就可以通过jstack查看内存使用的堆栈。
3、查看内存使用的堆栈:在这里我们挑选了TID=934的线程进行分析,首先需要将934这个id转换为16进制。需输入如下命令,
printf "%x\n" 9731
java|Java内存过高问题排查
文章图片


4、将PID为916的堆栈信息打印到jstack.log中,命令:jstack -l 916 > jstack.log
java|Java内存过高问题排查
文章图片


5、
查看堆栈信息文件,命令:vim jstack.log
在进行搜索TID为2603的相关信息。如图:
java|Java内存过高问题排查
文章图片

6、分析
可以看到这个线程状态为:RUNNABLE。是正在运行状态的
另外其它的大部分线程状态为:WAITING。通过查看文件分析 看到大量 Java Thread State。
说明它在等待另一个条件的发生,来把自己唤醒,或者干脆它是调用了 sleep(N)。
此时线程状态大致为以下几种:
java.lang.Thread.State: WAITING (parking):一直等那个条件发生;
java.lang.Thread.State: TIMED_WAITING (parking或sleeping):定时的,那个条件不到来,也将定时唤醒自己。

7.代码优化:将文件发送给开发。优化下线程
B:可能是其他原因导致的问题:
1、使用ps命令:ps -ef | grep java | grep -v grep
查看当前java进程列表
java|Java内存过高问题排查
文章图片

root83410 May13 ?00:30:09 /usr/lib/jvm/java/bin/java -Djava.util.logging.config.file=/data/apache-tomcat-9.0.13/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /data/apache-tomcat-9.0.13/bin/bootstrap.jar:/data/apache-tomcat-9.0.13/bin/tomcat-juli.jar -Dcatalina.base=/data/apache-tomcat-9.0.13 -Dcatalina.home=/data/apache-tomcat-9.0.13 -Djava.io.tmpdir=/data/apache-tomcat-9.0.13/temp org.apache.catalina.startup.Bootstrap start root129413 May13 ?14:41:25 /usr/lib/jvm/java/bin/java -Djava.util.logging.config.file=/data/apache-tomcat-9.0.13/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /data/apache-tomcat-9.0.13/bin/bootstrap.jar:/data/apache-tomcat-9.0.13/bin/tomcat-juli.jar -Dcatalina.base=/data/apache-tomcat-9.0.13 -Dcatalina.home=/data/apache-tomcat-9.0.13 -Djava.io.tmpdir=/data/apache-tomcat-9.0.13/temp org.apache.catalina.startup.Bootstrap start root208510 Mar05 ?01:57:08 /usr/lib/jvm/java/bin/java -Djava.util.logging.config.file=/data/apache-tomcat-9.0.13/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /data/apache-tomcat-9.0.13/bin/bootstrap.jar:/data/apache-tomcat-9.0.13/bin/tomcat-juli.jar -Dcatalina.base=/data/apache-tomcat-9.0.13 -Dcatalina.home=/data/apache-tomcat-9.0.13 -Djava.io.tmpdir=/data/apache-tomcat-9.0.13/temp org.apache.catalina.startup.Bootstrap start root1280810 Mar08 ?01:16:03 /usr/lib/jvm/java/bin/java -Djava.util.logging.config.file=/data/apache-tomcat-9.0.13/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /data/apache-tomcat-9.0.13/bin/bootstrap.jar:/data/apache-tomcat-9.0.13/bin/tomcat-juli.jar -Dcatalina.base=/data/apache-tomcat-9.0.13 -Dcatalina.home=/data/apache-tomcat-9.0.13 -Djava.io.tmpdir=/data/apache-tomcat-9.0.13/temp org.apache.catalina.startup.Bootstrap start root1939210 May09 ?00:36:19 /usr/lib/jvm/java/bin/java -Djava.util.logging.config.file=/data/apache-tomcat-9.0.13/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /data/apache-tomcat-9.0.13/bin/bootstrap.jar:/data/apache-tomcat-9.0.13/bin/tomcat-juli.jar -Dcatalina.base=/data/apache-tomcat-9.0.13 -Dcatalina.home=/data/apache-tomcat-9.0.13 -Djava.io.tmpdir=/data/apache-tomcat-9.0.13/temp org.apache.catalina.startup.Bootstrap start root1983811 May09 ?05:32:17 /usr/lib/jvm/java/bin/java -Djava.util.logging.config.file=/data/apache-tomcat-9.0.13/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /data/apache-tomcat-9.0.13/bin/bootstrap.jar:/data/apache-tomcat-9.0.13/bin/tomcat-juli.jar -Dcatalina.base=/data/apache-tomcat-9.0.13 -Dcatalina.home=/data/apache-tomcat-9.0.13 -Djava.io.tmpdir=/data/apache-tomcat-9.0.13/temp org.apache.catalina.startup.Bootstrap start root2154310 May27 ?00:22:03 /usr/lib/jvm/java/bin/java -Djava.util.logging.config.file=/data/apache-tomcat-9.0.13/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /data/apache-tomcat-9.0.13/bin/bootstrap.jar:/data/apache-tomcat-9.0.13/bin/tomcat-juli.jar -Dcatalina.base=/data/apache-tomcat-9.0.13 -Dcatalina.home=/data/apache-tomcat-9.0.13 -Djava.io.tmpdir=/data/apache-tomcat-9.0.13/temp org.apache.catalina.startup.Bootstrap start root2275015 May27 ?02:28:41 /usr/lib/jvm/java/bin/java -Djava.util.logging.config.file=/data/apache-tomcat-9.0.13/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /data/apache-tomcat-9.0.13/bin/bootstrap.jar:/data/apache-tomcat-9.0.13/bin/tomcat-juli.jar -Dcatalina.base=/data/apache-tomcat-9.0.13 -Dcatalina.home=/data/apache-tomcat-9.0.13 -Djava.io.tmpdir=/data/apache-tomcat-9.0.13/temp org.apache.catalina.startup.Bootstrap start

java|Java内存过高问题排查
文章图片

由上图所示,可以看到java进程是Tomcat的启动进程,开启多个Tomcat启动进程,并且是同一个端口。由此,可以判断,是因为关闭Tomcat服务时,java进程没有自动关闭,导致内存没有释放。
2、使用lsof命令:lsof | grep java |grep -v grep
查看当前进程的运行状态
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
java834rootcwdDIR252,14096393217 /root
java834rootrtdDIR252,140962 /
java834roottxtREG252,15128917742 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/bin/java
java834rootmemREG252,1262896269147 /usr/lib64/libjpeg.so.62.0.0
java834rootmemREG252,141400792676 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libjavajpeg.so
java834rootmemREG252,1644072266782 /usr/lib64/libfreetype.so.6.3.22
java834rootmemREG252,1349032792667 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libfontmanager.so
java834rootmemREG252,129072792665 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt_headless.so
java834rootmemREG252,1715224792664 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt.so
java834rootmemREG252,199174448269459 /usr/lib/locale/locale-archive
java834rootmemREG252,1111440656920 /lib64/libresolv-2.12.so
java834rootmemREG252,127896655389 /lib64/libnss_dns-2.12.so
....................

java1294rootcwdDIR252,14096393217 /root
java1294rootrtdDIR252,140962 /
java1294roottxtREG252,15128917742 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/bin/java
java1294rootmemREG252,199174448269459 /usr/lib/locale/locale-archive
java1294rootmemREG252,1262896269147 /usr/lib64/libjpeg.so.62.0.0
java1294rootmemREG252,141400792676 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libjavajpeg.so
java1294rootmemREG252,1644072266782 /usr/lib64/libfreetype.so.6.3.22
java1294rootmemREG252,1349032792667 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libfontmanager.so
java1294rootmemREG252,129072792665 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt_headless.so
java1294rootmemREG252,1715224792664 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt.so
java1294rootmemREG252,1111440656920 /lib64/libresolv-2.12.so
java1294rootmemREG252,127896655389 /lib64/libnss_dns-2.12.so
java1294rootmemREG252,111920131997 /var/cache/fontconfig/beeeeb3dfe132a8a0633a017c99ce0c0-le64.cache-3
java1294rootmemREG252,13203275792699 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/charsets.jar
java1294rootmemREG252,13509512792747 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/resources.jar
java1294rootmemREG252,1477712655369 /lib64/libfreeblpriv3.so
java1294rootmemREG252,1248720655363 /lib64/libnspr4.so
java1294rootmemREG252,118720655370 /lib64/libplc4.so
java1294rootmemREG252,114528655377 /lib64/libplds4.so
java1294rootmemREG252,1191928266783 /usr/lib64/libnssutil3.so
java1294rootmemREG252,11337168268947 /usr/lib64/libnss3.so
............

java2085rootcwdDIR252,1740962621998 /data/apache-tomcat-9.0.13/bin
java2085rootrtdDIR252,140962 /
java2085roottxtREG252,15128917742 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/bin/java
java2085rootmemREG252,199174448269459 /usr/lib/locale/locale-archive
java2085rootmemREG252,1111440656920 /lib64/libresolv-2.12.so
java2085rootmemREG252,127896655389 /lib64/libnss_dns-2.12.so
java2085rootmemREG252,13203275792699 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/charsets.jar
java2085rootmemREG252,13509512792747 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/resources.jar
java2085rootmemREG252,1477712655369 /lib64/libfreeblpriv3.so
java2085rootmemREG252,1248720655363 /lib64/libnspr4.so
java2085rootmemREG252,118720655370 /lib64/libplc4.so
java2085rootmemREG252,114528655377 /lib64/libplds4.so
java2085rootmemREG252,1191928266783 /usr/lib64/libnssutil3.so
java2085rootmemREG252,11337168268947 /usr/lib64/libnss3.so
java2085rootmemREG252,1185368266802 /usr/lib64/libsmime3.so
java2085rootmemREG252,1336472269139 /usr/lib64/libssl3.so
java2085rootmemREG252,145720792689 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libsunec.so
java2085rootmemREG252,136088792682 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libmanagement.so
java2085rootmemREG252,198280792684 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libnet.so
java2085rootmemREG252,173416792685 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libnio.so
java2085rootmemREG252,17349182622001 /data/apache-tomcat-9.0.13/bin/bootstrap.jar
java2085rootmemREG252,173280094792748 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/rt.jar
java2085rootmemREG252,1298029792717 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/ext/sunjce_provider.jar
............

java12808rootcwdDIR252,14096393217 /root
java12808rootrtdDIR252,140962 /
java12808roottxtREG252,15128917742 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/bin/java
java12808rootmemREG252,199174448269459 /usr/lib/locale/locale-archive
java12808rootmemREG252,1111440656920 /lib64/libresolv-2.12.so
java12808rootmemREG252,127896655389 /lib64/libnss_dns-2.12.so
java12808rootmemREG252,13509512792747 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/resources.jar
java12808rootmemREG252,1477712655369 /lib64/libfreeblpriv3.so
java12808rootmemREG252,1248720655363 /lib64/libnspr4.so
java12808rootmemREG252,118720655370 /lib64/libplc4.so
java12808rootmemREG252,13203275792699 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/charsets.jar
java12808rootmemREG252,114528655377 /lib64/libplds4.so
java12808rootmemREG252,1191928266783 /usr/lib64/libnssutil3.so
java12808rootmemREG252,11337168268947 /usr/lib64/libnss3.so
java12808rootmemREG252,1185368266802 /usr/lib64/libsmime3.so
java12808rootmemREG252,1336472269139 /usr/lib64/libssl3.so
java12808rootmemREG252,145720792689 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libsunec.so
java12808rootmemREG252,136088792682 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libmanagement.so
java12808rootmemREG252,198280792684 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libnet.so
java12808rootmemREG252,173416792685 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libnio.so
..........

java19392rootcwdDIR252,14096393217 /root
java19392rootrtdDIR252,140962 /
java19392roottxtREG252,15128917742 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/bin/java
java19392rootmemREG252,1262896269147 /usr/lib64/libjpeg.so.62.0.0
java19392rootmemREG252,141400792676 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libjavajpeg.so
java19392rootmemREG252,1644072266782 /usr/lib64/libfreetype.so.6.3.22
java19392rootmemREG252,1349032792667 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libfontmanager.so
java19392rootmemREG252,129072792665 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt_headless.so
java19392rootmemREG252,1715224792664 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt.so
java19392rootmemREG252,199174448269459 /usr/lib/locale/locale-archive
java19392rootmemREG252,1111440656920 /lib64/libresolv-2.12.so
java19392rootmemREG252,127896655389 /lib64/libnss_dns-2.12.so
java19392rootmemREG252,111920131997 /var/cache/fontconfig/beeeeb3dfe132a8a0633a017c99ce0c0-le64.cache-3
java19392rootmemREG252,13203275792699 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/charsets.jar
java19392rootmemREG252,13509512792747 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/resources.jar
java19392rootmemREG252,1477712655369 /lib64/libfreeblpriv3.so
java19392rootmemREG252,1248720655363 /lib64/libnspr4.so
java19392rootmemREG252,118720655370 /lib64/libplc4.so
java19392rootmemREG252,114528655377 /lib64/libplds4.so
java19392rootmemREG252,1191928266783 /usr/lib64/libnssutil3.so
...........

java19838rootcwdDIR252,14096393217 /root
java19838rootrtdDIR252,140962 /
java19838roottxtREG252,15128917742 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/bin/java
java19838rootmemREG252,199174448269459 /usr/lib/locale/locale-archive
java19838rootmemREG252,1262896269147 /usr/lib64/libjpeg.so.62.0.0
java19838rootmemREG252,141400792676 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libjavajpeg.so
java19838rootmemREG252,1644072266782 /usr/lib64/libfreetype.so.6.3.22
java19838rootmemREG252,1349032792667 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libfontmanager.so
java19838rootmemREG252,129072792665 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt_headless.so
java19838rootmemREG252,1715224792664 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt.so
java19838rootmemREG252,111920131997 /var/cache/fontconfig/beeeeb3dfe132a8a0633a017c99ce0c0-le64.cache-3
java19838rootmemREG252,1111440656920 /lib64/libresolv-2.12.so
java19838rootmemREG252,127896655389 /lib64/libnss_dns-2.12.so
java19838rootmemREG252,13203275792699 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/charsets.jar
java19838rootmemREG252,13509512792747 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/resources.jar
java19838rootmemREG252,1477712655369 /lib64/libfreeblpriv3.so
java19838rootmemREG252,1248720655363 /lib64/libnspr4.so
java19838rootmemREG252,118720655370 /lib64/libplc4.so
java19838rootmemREG252,114528655377 /lib64/libplds4.so
.........

java21543rootcwdDIR252,14096393217 /root
java21543rootrtdDIR252,140962 /
java21543roottxtREG252,15128917742 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/bin/java
java21543rootmemREG252,1262896269147 /usr/lib64/libjpeg.so.62.0.0
java21543rootmemREG252,141400792676 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libjavajpeg.so
java21543rootmemREG252,1644072266782 /usr/lib64/libfreetype.so.6.3.22
java21543rootmemREG252,1349032792667 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libfontmanager.so
java21543rootmemREG252,129072792665 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt_headless.so
java21543rootmemREG252,1715224792664 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt.so
java21543rootmemREG252,1111440656920 /lib64/libresolv-2.12.so
java21543rootmemREG252,127896655389 /lib64/libnss_dns-2.12.so
java21543rootmemREG252,13509512792747 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/resources.jar
java21543rootmemREG252,13203275792699 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/charsets.jar
java21543rootmemREG252,111920131997 /var/cache/fontconfig/beeeeb3dfe132a8a0633a017c99ce0c0-le64.cache-3
java21543rootmemREG252,1477712655369 /lib64/libfreeblpriv3.so
java21543rootmemREG252,1248720655363 /lib64/libnspr4.so
java21543rootmemREG252,118720655370 /lib64/libplc4.so
java21543rootmemREG252,114528655377 /lib64/libplds4.so
java21543rootmemREG252,1191928266783 /usr/lib64/libnssutil3.so
........

java22750rootcwdDIR252,14096393217 /root
java22750rootrtdDIR252,140962 /
java22750roottxtREG252,15128917742 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/bin/java
java22750rootmemREG252,1262896269147 /usr/lib64/libjpeg.so.62.0.0
java22750rootmemREG252,141400792676 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libjavajpeg.so
java22750rootmemREG252,1644072266782 /usr/lib64/libfreetype.so.6.3.22
java22750rootmemREG252,1349032792667 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libfontmanager.so
java22750rootmemREG252,129072792665 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt_headless.so
java22750rootmemREG252,1715224792664 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt.so
java22750rootmemREG252,1111440656920 /lib64/libresolv-2.12.so
java22750rootmemREG252,127896655389 /lib64/libnss_dns-2.12.so
java22750rootmemREG252,111920131997 /var/cache/fontconfig/beeeeb3dfe132a8a0633a017c99ce0c0-le64.cache-3
java22750rootmemREG252,13203275792699 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/charsets.jar
java22750rootmemREG252,13509512792747 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/resources.jar
java22750rootmemREG252,1477712655369 /lib64/libfreeblpriv3.so
java22750rootmemREG252,1248720655363 /lib64/libnspr4.so
........

java29458rootcwdDIR252,14096393217 /root
java29458rootrtdDIR252,140962 /
java29458roottxtREG252,15128917742 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/bin/java
java29458rootmemREG252,199174448269459 /usr/lib/locale/locale-archive
java29458rootmemREG252,1262896269147 /usr/lib64/libjpeg.so.62.0.0
java29458rootmemREG252,141400792676 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libjavajpeg.so
java29458rootmemREG252,1644072266782 /usr/lib64/libfreetype.so.6.3.22
java29458rootmemREG252,1349032792667 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libfontmanager.so
java29458rootmemREG252,129072792665 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt_headless.so
java29458rootmemREG252,1715224792664 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el6_10.x86_64/jre/lib/amd64/libawt.so
java29458rootmemREG252,111920131997 /var/cache/fontconfig/beeeeb3dfe132a8a0633a017c99ce0c0-le64.cache-3
............
java29458root235uIPv4344899690t0TCP localhost:57037->localhost:mysql (ESTABLISHED)
java29458root236uIPv4344899710t0TCP localhost:57036->localhost:mysql (ESTABLISHED)
java29458root237uIPv4344899700t0TCP localhost:57040->localhost:mysql (ESTABLISHED)
java29458root238uIPv4344899820t0TCP localhost:57042->localhost:mysql (ESTABLISHED)
java29458root239uIPv4344899830t0TCP localhost:57043->localhost:mysql (ESTABLISHED)
java29458root240uIPv4344899840t0TCP localhost:57046->localhost:mysql (ESTABLISHED)
通过上图所示:正常运行的Tomcat状态应为PID:29458的java进程
3、杀掉其他的java的进程
【java|Java内存过高问题排查】kill -9 PID

    推荐阅读