标签:The proc awk inux nbsp roc mon lin 进程
查找pid的进程号: ps -ef | grep nginx | grep -v grep | awk ‘{print $2}‘
#!/bin/sh . ./common-env.sh shutdownService(){ # Find the service process id sid=`ps -ef | grep $1 | grep -v grep | awk ‘{print $2}‘` if [ -n "${sid}" ]; then echo "Shutdown $1" kill ${sid} else echo "$1 not found" fi } # Shut down all services for service in ${oxx_services[*]} do shutdownService ${service} done
标签:The proc awk inux nbsp roc mon lin 进程
原文地址:https://www.cnblogs.com/bigbigwood/p/9977036.html