home

Tags

linux,用脚本将进程提高优先级

December 27th, 2006

新建
nice.sh文件,属性为777(CHMOD 777 nice.sh)

内容为:
#!/bin/sh
ps -ef|grep hlds_run15|grep -v grep|awk ‘{print $2}’|while read ID;do renice -20 $ID;done

其中hlds_run15为进程名称。可用ps -A命令先查看进程名称。\r

感谢:
划破黑暗
sshnuke