使用nice调整进程优先级
nice
nice检查进程的Nice值
ps -elfF S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
4 S root 1 0 0 75 0 - 2592 ? 2014 ? 00:05:02 init [3]
1 S root 2 1 0 -40 - - 0 migrat 2014 ? 00:02:48 [migration/0]
1 S root 3 1 0 94 19 - 0 ksofti 2014 ? 00:01:09 [ksoftirqd/0]
5 S root 4 1 0 -40 - - 0 watchd 2014 ? 00:00:00 [watchdog/0]
1 S root 5 1 0 70 -5 - 0 worker 2014 ? 00:01:13 [events/0]
1 S root 6 1 0 70 -5 - 0 worker 2014 ? 00:00:20 [khelper]
...
1 S root 131 7 0 80 -5 - 0 worker 2014 ? 00:00:00 [aio/0]
1 S root 132 7 0 80 -5 - 0 worker 2014 ? 00:00:00 [aio/1]
1 S root 133 7 0 80 -5 - 0 worker 2014 ? 00:00:00 [aio/2]
1 S root 134 7 0 80 -5 - 0 worker 2014 ? 00:00:00 [aio/3]
1 S root 264 7 0 71 -5 - 0 worker 2014 ? 00:00:00 [kpsmoused]
5 S 53312 300 32766 0 75 0 - 22028 ? 2015 ? 00:00:00 sshd: xuangao.djj@pts/911
4 S admin 301 300 0 75 0 - 14084 - 2015 pts/911 00:00:00 ssh localhost
...
0 S admin 328 20578 0 75 0 - 16646 - Jun12 pts/1450 00:00:00 /bin/bash
1 S root 341 7 0 73 -5 - 0 worker 2014 ? 00:00:00 [kstriped]
1 S root 362 7 0 70 -5 - 0 kjourn 2014 ? 00:01:43 [kjournald]
1 S root 384 7 0 71 -5 - 0 kaudit 2014 ? 00:00:00 [kauditd]设置进程nice值
使用-n参数修改运行进程的优先级
-n参数修改运行进程的优先级limits.conf配置用户启动进程的默认nice值
limits.conf配置用户启动进程的默认nice值修改已经运行的进程的优先级
参考
Last updated