[hadoop@hadoop1 ~]$ jps 54450 Jps 10611 NodeManager 5720 NameNode 6030 SecondaryNameNode 5823 DataNode 10511 ResourceManager [hadoop@hadoop1 ~]$ [hadoop@hadoop1 ~]$ which jps /usr/java/jdk1.8.0_45/bin/jps [hadoop@hadoop1 ~]$ [root@hadoop1 ~]# cd /tmp/hsperfdata_hadoop/ [root@hadoop1 hsperfdata_hadoop]# ll total 160 -rw-------. 1 hadoop hadoop 32768 Dec 1710:1110511 -rw-------. 1 hadoop hadoop 32768 Dec 1710:1110611 -rw-------. 1 hadoop hadoop 32768 Dec 1710:115720 -rw-------. 1 hadoop hadoop 32768 Dec 1710:115823 -rw-------. 1 hadoop hadoop 32768 Dec 1710:116030
下面的是使用jps查看进程的正常流程
1.使用jps查看应用进程发现报错 process information unavailable
2.使用命令ps -ef |greo 10611 来进行查看此进程对应的使用用户
3.切换到该用户,然后使用jps再次进行查看进程信息,得到正确的信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
[root@hadoop1 hsperfdata_hadoop]# jps 10611 -- process information unavailable 6325 jar 54487 Jps 5720 -- process information unavailable 6030 -- process information unavailable 5823 -- process information unavailable 10511 -- process information unavailable [root@hadoop1 hsperfdata_hadoop]# ps -ef |greo 10611 找到该进程的使用用户名称 [root@hadoop1 hsperfdata_hadoop]# su - hadoop [hadoop@hadoop1 ~]$ jps 10611 NodeManager 5720 NameNode 54524 Jps 6030 SecondaryNameNode 5823 DataNode 10511 ResourceManager
[root@hadoop1 rundeck]# jps 10611 -- process information unavailable 6325 jar 5720 -- process information unavailable 6030 -- process information unavailable 54591 Jps 5823 -- process information unavailable 10511 -- process information unavailable [root@hadoop1 rundeck]# [root@hadoop1 rundeck]# kill -9 10611 [root@hadoop1 rundeck]# jps 10611 -- process information unavailable 6325 jar 5720 -- process information unavailable 54605 Jps 6030 -- process information unavailable 5823 -- process information unavailable 10511 -- process information unavailable [root@hadoop1 rundeck]# ps -ef|grep 10611 root 5461848324010:15 pts/100:00:00 grep 10611 [root@hadoop1 rundeck]# 10611信息残留,去/tmp/hsperfdata_hadoop文件夹删除该10611文件 [root@hadoop1 hsperfdata_hadoop]# ll total 160 -rw-------. 1 hadoop hadoop 32768 Dec 1710:1710511 -rw-------. 1 hadoop hadoop 32768 Dec 1710:1510611 -rw-------. 1 hadoop hadoop 32768 Dec 1710:175720 -rw-------. 1 hadoop hadoop 32768 Dec 1710:175823 -rw-------. 1 hadoop hadoop 32768 Dec 1710:166030 [root@hadoop1 hsperfdata_hadoop]# rm -f 10611 [root@hadoop1 hsperfdata_hadoop]# [root@hadoop1 hsperfdata_hadoop]# jps 54626 Jps 6325 jar 5720 -- process information unavailable 6030 -- process information unavailable 5823 -- process information unavailable 10511 -- process information unavailable [root@hadoop1 hsperfdata_hadoop]# su - hadoop [hadoop@hadoop1 ~]$ jps 54661 Jps 5720 NameNode 6030 SecondaryNameNode 5823 DataNode 10511 ResourceManager [hadoop@hadoop1 ~]$