0
点赞
收藏
分享

微信扫一扫

脚本一、检查 linux 进程是否存在

天悦哥 2022-03-11 阅读 75
#!/bin/bash
for i in {ora_smon_orcl,ora_pmon_orcl};do
status=`ps -ef | grep smon | grep -v grep|wc -l`
if [ $status -ne 0 ];then
echo -e "$i is\033[32m running \033[0m"
else
echo -e "$i is\033[31m not running \033[0m"
fi
done


举报

相关推荐

0 条评论