查找内存超过5%,CPU超过10%
CPU=${1:-10} MEM=${2:-5} for CTID in `vzlist|sed '1d'|awk '{print $1}'` { echo "=========== $CTID ===========" vzctl exec $CTID ps aux|awk '$3>='"${CPU}"'||$4>='"${MEM}"'{print $0}' }
查找内存超过5%,CPU超过10%
CPU=${1:-10} MEM=${2:-5} for CTID in `vzlist|sed '1d'|awk '{print $1}'` { echo "=========== $CTID ===========" vzctl exec $CTID ps aux|awk '$3>='"${CPU}"'||$4>='"${MEM}"'{print $0}' }