1.查看java进程,并导出文件
[root@MiWiFi-R4-srv home]# jps -l
2728 sun.tools.jps.Jps
2622 ./jvm-0.0.1-SNAPSHOT.jar
[root@MiWiFi-R4-srv home]# jststak 2622 > 2622.txt
-bash: jststak: command not found
[root@MiWiFi-R4-srv home]# jstack 2622 > 2622.txt
[root@MiWiFi-R4-srv home]# sz 2622.txt
[root@MiWiFi-R4-srv home]#
2.使用top -p 2622 -H 查看看所有java中的进程
[root@MiWiFi-R4-srv home]# top -p 2622 -H
top - 05:35:51 up 11 min, 1 user, load average: 1.81, 1.24, 0.53
Tasks: 30 total, 2 running, 28 sleeping, 0 stopped, 0 zombie
Cpu(s): 91.4%us, 0.8%sy, 0.0%ni, 7.6%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 1906556k total, 1443924k used, 462632k free, 23812k buffers
Swap: 2097144k total, 0k used, 2097144k free, 249896k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2624 root 20 0 2929m 603m 12m R 87.9 32.4 4:31.58 java
3.转换为16进制去第一步文件中进行查找
[root@MiWiFi-R4-srv home]# printf "%x" 2624
a40
转换后为a40接着去第一步导出的文件中进行查找
--------------------------------