shell 进程监控

#!/bin/bash

count=`ps aux | grep "kafka" | grep -v grep -c`

if [ $count -eq 0 ]; then
    echo 'Not running...'
else
    echo 'running...'
fi
原文地址:https://www.cnblogs.com/kgdxpr/p/14793096.html