标签:storm solr stat wan 服务 linux服务器 jps swap swap空间
#!/bin/bashecho -e "\033[34m服务器重要进程:\033[0m"
echo -e "\033[36mhbase进程:\033[0m"
jps -l |grep hbase
mei=$(echo $?|awk ‘NR==1{print $1}‘)
for i in $mei
do
if [ $i -gt 0 ]; then
echo -e "\033[35m>>>>no hbase,进程挂了,请注意!... \033[0m"
fi
done
echo -e "\033[31mMpp进程(2个):\033[0m"
jps -l |grep MppService_232
wan=$(echo $?|awk ‘NR==1{print $1}‘)
for i in $wan
do
if [ $i -gt 0 ]; then
echo -e "\033[35m >>>>no MppService_232,进程挂了,请注意!...\033[0m"
fi
done
jps -l |grep MppService-0
wah=$(echo $?|awk ‘NR==1{print $1}‘)
for i in $wah
do
if [ $i -gt 0 ]; then
echo -e "\033[35m >>>>no MppService,进程挂了,请注意!...\033[0m"
fi
done
echo -e "\033[31mkafka的进程: \033[0m"
jps -l |grep kafka
waho=$(echo $?|awk ‘NR==1{print $1}‘)
for i in $waho
do
if [ $i -gt 0 ]; then
echo -e "\033[35m >>>>no kafka,进程挂了,请注意!...\033[0m"
fi
done
echo -e "\033[31mstorm进程:\033[0m"
jps -l |grep org.apache.storm.daemon.supervisor.Supervisor
wahon=$(echo $?|awk ‘NR==1{print $1}‘)
for i in $wahww
do
if [ $i -gt 0 ]; then
echo -e "\033[35m >>>>no storm,进程挂了,请注意!...\033[0m"
fi
done
echo -e "\033[31mzookeeper进程:\033[0m"
jps -l |grep zookeeper
wahong=$(echo $?|awk ‘NR==1{print $1}‘)
for i in $wahop
do
if [ $i -gt 0 ]; then
echo -e "\033[35m >>>>no zookeeper,进程挂了,请注意!...\033[0m"
fi
done
echo -e "\033[31mredis微服务进程:\033[0m"
jps -l |grep redis
wanhong=$(echo $?|awk ‘NR==1{print $1}‘)
for i in $wanhon
do
if [ $i -gt 0 ]; then
echo -e "\033[35m >>>>no redis,进程挂了,请注意!...\033[0m"
fi
done
echo -e "\033[31mhadoop进程(3个):\033[0m"
jps -l |grep org.apache.hadoop.hdfs.server.datanode.DataNode
wangLhong=$(echo $?|awk ‘NR==1{print $1}‘)
for i in $wLhow
do
if [ $i -gt 0 ]; then
echo -e "\033[35m >>>>no hdfs DataNode,进程挂了,请注意!...\033[0m"
fi
done
jps -l |grep org.apache.hadoop.yarn.server.nodemanager.NodeManager
wlh=$(echo $?|awk ‘NR==1{print $1}‘)
for i in $wlgwh
do
if [ $i -gt 0 ]; then
echo -e "\033[35m >>>>no yarn NodeManagtr,进程挂了,请注意!...\033[0m"
fi
done
jps -l |grep org.apache.hadoop.hbase.regionserver.HRegionServer
wloh=$(echo $?|awk ‘NR==1{print $1}‘)
for i in $wloh
do
if [ $i -gt 0 ]; then
echo -e "\033[35m >>>>no hbase HRegionServer,进程挂了,请注意!...\033[0m"
fi
done
echo -e "\033[31m硬盘空间使用情况:\033[0m"
df -Th
echo -e "\033[31m查看solr进程:\033[0m"
ps -ef |grep solr |grep /opt/java/jdk1.8.0_112/bin/java
jps -l|grep start.jar
wanghong=$(echo $?|awk ‘NR==1{print $1}‘)
for i in $wanghp
do
if [ $i -gt 0 ]; then
echo -e "\033[35m >>>>no solr,进程挂了,请注意!...\033[0m"
fi
done
标签:storm solr stat wan 服务 linux服务器 jps swap swap空间
原文地址:https://blog.51cto.com/14861926/2512629