centos下常用的查找某些程序是否启动的脚本
#!/bin/sh
echo -e "\r\n\033[30;31;25m本脚本是一段检查指定程序是否启动的脚本\033[30;31;25m\r\n"
echo -e "\r\n\033[30;31;25m在Ubuntu中使用 'sh' 文件名运行该脚本\033[30;31;25m\r\n"
echo -e "\r\n\033[30;31;25m在CentOs中使用绝对或相对路径运行该脚本即可\033[30;31;25m\r\n"
echo -e "\n\n\033[30;31;25m 检查nginx \n\n----------------------\033[0m"
ps aux|grep nginx
echo -e "\n\n\033[30;31;25m 检查rabbitmq \n\n----------------------\033[0m"
ps aux|grep rabbit
echo -e "\n\n\033[30;31;25m 检查es \n\n----------------------\033[0m"
ps aux|grep elastic
echo -e "\n\n\033[30;31;25m 检查fastDFS \n\n----------------------\033[0m"
ps aux|grep fdfs
echo -e "\n\n\033[30;31;25m 检查redis \n\n----------------------\033[0m"
ps aux|grep redis
echo -e "\n\n\033[30;31;25m 检查mysql \n\n----------------------\033[0m"
ps aux|grep mysql
echo -e "\n\n\033[30;31;25m 检查jenkins \n\n----------------------\033[0m"
ps aux|grep jenkins
echo -e "\n\n\033[30;31;25m 检查docker \n\n----------------------\033[0m"
ps aux|grep docker
echo -e "\n\n\033[30;31;25m 检查zookeeper \n\n----------------------\033[0m"
ps aux|grep zookeeper
echo -e "\n\n\033[30;31;25m 检查dubbo-admin, 只需要看是否有这个端口的java应用 \n\n----------------------\033[0m"
netstat -nlp|grep 8090