jpsall

!/bin/bash

for i in hadoop101 hadoop102 hadoop103
do
echo --------------------- $i -------------------------------
ssh $i "source /etc/profile && jps | grep -v Jps "
done

原文地址:https://www.cnblogs.com/leigepython/p/12363318.html