In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Brief introduction:
Jps (Java Virtual Machine Process Status Tool) is a command that displays the pid of all current java processes provided by JDK 1.5. It is simple and practical, and is very suitable for simply viewing some simple situations of the current java process on the linux/unix platform.
For more information, please see https://www.cnblogs.com/toSeeMyDream/p/5747412.html.
Note: the jps command is very bad, it seems that it can only show the current user's java process, showing that other users are easy to report an error-- process information unavailable
Let's simulate the real death or fake death of jps in the actual production of Hadoop.
1. Simulate host outage [root@hadoop000 ~] # jps4868 DataNode5062 SecondaryNameNode5256 Jps4717 NameNode [root@hadoop000 ~] # kill-9 $(pgrep-f hadoop-2.8.1) [root@hadoop000 ~] # jps4868-- process information unavailable5062-- process information unavailable4717-- process information unavailable5279 Jps [root@hadoop000 ~] # ps-ef | grep 4868root 5301 0 14:39 pts/0 00:00:00 grep 486 process does not have removable / tmp/hsperfdata_hadoop folder to delete residual files [root@hadoop000] # cd / tmp/hsperfdata_hadoop/ [root @ hadoop000 hsperfdata_hadoop] # lltotal 96 root@hadoop000 hsperfdata_hadoop RW-1 hadoop hadoop 32768 May 19 14:38 4717 hadoop hadoop 32768 May 19 14:38 4868 UV RW-1 hadoop hadoop 32768 May 19 14:38 5062 [root@hadoop000 hsperfdata_hadoop] # rm * rm: remove regular file `4717 colors? Yesrm: remove regular file `4868mm? Yesrm: remove regular file `5062? Yes# displays the correct [root@hadoop000 hsperfdata_hadoop] # jps5304 Jps2. Start hdfs again with the hadoop user Then use jps to view information # hadoop user [hadoop@hadoop000 hadoop-2.8.1] $pwd/opt/software/hadoop-2.8.1 [hadoop@hadoop000 hadoop-2.8.1] $sbin/start-dfs.sh [hadoop@hadoop000 hadoop-2.8.1] $jps10004 SecondaryNameNode9655 NameNode10219 Jps9806 DataNode#root user [root@hadoop000 ~] # jps10004-process information unavailable9655-process information unavailable10187 Jps9806-process information unavailable [root@hadoop000 hsperfdata_hadoop] # ps- Ef | grep 10004hadoop 10004 1 3 15:07? 00:00:08 / usr/local/java1.8/bin/java-Dproc_secondarynamenode-Xmx1000m-Djava.net.preferIPv4Stack=true-Dhadoop.log.dir=/opt/software/hadoop-2.8.1/logs-Dhadoop.log.file=hadoop.log-Dhadoop.home.dir=/opt/software/hadoop-2.8.1-Dhadoop.id.str=hadoop-Dhadoop.root.logger=INFO Console-Djava.library.path=/opt/software/hadoop-2.8.1/lib/native-Dhadoop.policy.file=hadoop-policy.xml-Djava.net.preferIPv4Stack=true-Dhadoop.log.dir=/opt/software/hadoop-2.8.1/logs-Dhadoop.log.file=hadoop-hadoop-secondarynamenode-hadoop000.log-Dhadoop.home.dir=/opt/software/hadoop-2.8.1-Dhadoop.id.str=hadoop-Dhadoop.root.logger=INFO RFA-Djava.library.path=/opt/software/hadoop-2.8.1/lib/native-Dhadoop.policy.file=hadoop-policy.xml-Djava.net.preferIPv4Stack=true-Dhadoop.security.logger=INFO,RFAS-Dhdfs.audit.logger=INFO,NullAppender-Dhadoop.security.logger=INFO,RFAS-Dhdfs.audit.logger=INFO,NullAppender-Dhadoop.security.logger=INFO,RFAS-Dhdfs.audit.logger=INFO,NullAppender-Dhadoop.security.logger=INFO RFAS org.apache.hadoop.hdfs.server.namenode.SecondaryNameNoderoot 10256 7539 0 15:11 pts/3 00:00:00 grep 10004 delete # do not go to the / tmp directory to delete when you see the process exist. Use su to switch to the jps under the hadoop user and display normal 3. Production environment jps error process information unavailable process 1.jps finds each process number 2.ps-ef | whether the grep pid exists (it is critical to check whether the process exists) 3. If the process does not exist, we can go to the / tmp/hsperfdata_xxx to delete 4. If there is, do not delete it, it is not allowed to check it yourself. Switch to the user who started the HDFS process (usually the hadoop user) and then use jps to display normal.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.