【13】進程監控腳本-getPID.sh

#!/bin/bash

# get size of java process PID

PName=$1
#echo $PName

      if [ "$PName" != "" ];then   
       pid=`ps aux | grep $PName | grep -v grep | grep -v zabbix |awk '{print $2}'` 
       echo $pid
   fi 
相關文章
相關標籤/搜索