标签:server echo code lsof service stat RoCE 达梦 ash
#!/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
标签:server echo code lsof service stat RoCE 达梦 ash
原文地址:https://blog.51cto.com/alanfree/2444625