红联Linux门户
Linux帮助

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

发布时间:2007-01-17 01:04:35来源:红联作者:fitness
新建
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命令先查看进程名称。
文章评论

共有 0 条评论