!6610 调整dss_contrl脚本,避免杀掉cm_server启动的perctrl

Merge pull request !6610 from Carl/rto
This commit is contained in:
opengauss_bot
2024-11-05 02:21:25 +00:00
committed by Gitee
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,3 @@
dms_commit_id=57edf641c1feb77c543cf5492dc70e9a3278b41a
dss_commit_id=a9b6497b90790725d6ca684af8101f3d2e130d31
cbb_commit_id=87bfb93353ba7838deb3611507edd4afe7058903
cbb_commit_id=edfb66049990c4bc1e8ef084bc4b54181b3f3669

View File

@ -74,8 +74,17 @@ program_pid()
program_pid2()
{
pid=`ps -f f -u \`whoami\` | grep -w ${1} | grep -v grep | grep -v ${SCRIPT_NAME} | awk '{print $2}'`
echo ${pid}
pid=`ps -f -u \`whoami\` | grep -w ${1} | grep -v grep | grep -v ${SCRIPT_NAME} | awk '{print $2}'`
result=""
for p in ${pid}; do
ppid=`ps -o ppid= -p ${p}`
parent_name=`ps -p ${ppid} -o comm=`
if [ "${parent_name}" != "cm_server" ]; then
result="${result} ${p}"
fi
done
echo ${result}
}
program_status()