红联Linux门户
Linux帮助

在Linux中用脚本将进程提高优先级

发布时间:2014-03-22 09:32:06来源:红联作者:tioced
新建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 条评论