查看多台机器jps脚本

创建vi jps.sh

#!/bin/bash
for((host=1; host<5; host++));
do
        echo --------------------- hdp-$host ----------------
        ssh hdp-$host /root/apps/jdk1.8.0_201/bin/jps
done

chmod -777 jps.sh给予权限

启动:./jps.sh进行查看

--------------------- hdp-1 ----------------
3008 NameNode
4804 Jps
3510 NodeManager
3400 ResourceManager
3866 QuorumPeerMain
3147 DataNode
--------------------- hdp-2 ----------------
3472 Jps
2034 DataNode
2371 QuorumPeerMain
2215 NodeManager
2139 SecondaryNameNode
--------------------- hdp-3 ----------------
2163 QuorumPeerMain
2006 NodeManager
1896 DataNode
2362 Jps

 

上一篇:Hadoop_简介_01


下一篇:DataNode 工作机制