linux 下检查java jar包 程序是否正常 shell
linux 下检查java jar包 程序是否正常 shell
http://injavawetrust.iteye.com
BATCH_SERVER="batch.jar"
NR=`ps -ef | grep "${BATCH_SERVER}" | grep -v grep | wc -l`
if [ "$NR" -eq 1 ]
then
echo "服务正常"
else
echo "服务异常"
fi