时间:2021-07-01 10:21:17 帮助过:121人阅读
#!/bin/bash
status=`/etc/init.d/DmServiceDMSERVER status | grep running | wc -l`
process=`ps -ef | grep dmserver | grep -v grep | wc -l`
port=`lsof -i:5236 | grep -i listen | wc -l`
if
[ $port -ne 0 ] && [ $process -ne 0 ] && [ $status -ne 0 ]
then
echo "dmserver is running"
else
echo "dmserver is not running"
fi
SHELL脚本监控达梦数据库是否运行?
标签:server echo code lsof service stat RoCE 达梦 ash