我後來辜到一個程式
網址連結:http://0rz.tw/S8dQb
轉貼如下:
當process CPU loading超過90%, 就先行刪除:
#!/bin/bash
CPULOADING=90
ps auxh | \
while read pro
do
set -- $pro
if [ `echo $3 | cut -d"." -f1` -gt $CPULOADING ]; then
kill $2
fi
done
後來想想 應該也滿合用的!把不合理過高的cpu使用量都kill掉!
不知道這支程式是否能如期正常運作?! 感謝指導。
--
網址連結:http://0rz.tw/S8dQb
轉貼如下:
當process CPU loading超過90%, 就先行刪除:
#!/bin/bash
CPULOADING=90
ps auxh | \
while read pro
do
set -- $pro
if [ `echo $3 | cut -d"." -f1` -gt $CPULOADING ]; then
kill $2
fi
done
後來想想 應該也滿合用的!把不合理過高的cpu使用量都kill掉!
不知道這支程式是否能如期正常運作?! 感謝指導。
--
All Comments