echo "nodej22"
echo "nodej32"
echo "nodej42"
echo "nodej52"
echo "nodej62"
echo "nodej72"
echo "nodej82"
echo "请输入server主机名(例:nodej22):"
#aaa=$1
#echo "====== $aaa"
read host_name
INCEPTOR_SERVER=$host_name
#JPS=`which jps`
#JSTAT=`which jstat`
#检查server gc 情况
SERVER_PORT=`ssh $INCEPTOR_SERVER sudo jps | grep InceptorServer2 | awk '{print $1}'`
SERVER_OLD_PER=`ssh $INCEPTOR_SERVER sudo jstat -gcutil $SERVER_PORT |grep -v O| awk '{printf "%.f\n",$4}'`
echo begin checking server on $INCEPTOR_SERVER
if [ 65 -lt $SERVER_OLD_PER ];then
echo -e "\033[33mWARN: Inceptor Server--sparkDriver@$INCEPTOR_SERVER , pid is $SERVER_PORT, Mem oldPer is too high($SERVER_OLD_PER%) \033[0m"
else
echo -e "\033[32mINFO: Inceptor Server--sparkDriver@$INCEPTOR_SERVER , pid is $SERVER_PORT,(Mem oldPer is $SERVER_OLD_PER%) is healthy.\033[0m"
fi
检查gc使用情况
最新推荐文章于 2022-10-27 10:24:27 发布