ps: 查看linux當前時程狀態
ps [options]
ps支持三種版本的選項:
unix 風格選項:ps –aux
bsd風格選項: ps aux
gnu風格選項: ps --pid 1
-A : 查看所有進程,同-e
-a : 查看所有進程,除了session leader
x : 用於和-a組合,列出所有進程
常用命令組合:
查看每一個進程
ps –ef
ps –eF
ps –ely
查看每一個進程(使用BSD風格)
ps ax
ps axu
查看進程樹
ps –ejH
ps –axjf
查看線程信息
ps –eLf
ps axms
查看以root用戶運行的每個進程
ps -Uroot -uroot u
以用戶自定義格式顯示每個進程
ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
ps -eopid,tt,user,fname,tmout,f,wchan
#ps axu
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 17128 1316 ? Ss Aug21 0:01 /sbin/init
root 2 0.0 0.0 0 0 ? S Aug21 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S Aug21 0:00 [migration/0]
root 4 0.0 0.0 0 0 ? S Aug21 0:06 [ksoftirqd/0]root 509 0.0 0.0 11104 1276 ? S<s Aug21 0:00 /sbin/udevd -d
root 575 0.0 0.0 11100 1228 ? S< Sep01 0:00 /sbin/udevd -d
root 706 0.0 0.0 11100 1220 ? S< Sep01 0:00 /sbin/udevd -d
root 796 0.0 0.0 0 0 ? S Aug21 0:12 [vmmemctl]
root 1082 0.0 0.0 0 0 ? S Aug21 0:00 [kdmflush]
root 1117 0.0 0.0 0 0 ? S Aug21 0:00 [jbd2/sda1-8]
root 1118 0.0 0.0 0 0 ? S Aug21 0:00 [ext4-dio-unwrit]
root 1119 0.0 0.0 0 0 ? S Aug21 0:00 [jbd2/dm-2-8]
root 1120 0.0 0.0 0 0 ? S Aug21 0:00 [ext4-dio-unwrit]
root 1315 0.0 0.0 0 0 ? S Aug21 0:19 [flush-253:0]
root 1377 0.0 0.0 329048 2296 ? Sl Aug21 0:00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
rpc 1420 0.0 0.0 18976 900 ? Ss Aug21 0:01 rpcbind
dbus 1435 0.0 0.0 21804 1324 ? Ss Aug21 0:01 dbus-daemon --system
root 1445 0.0 0.1 84328 5680 ? Ss Aug21 0:03 NetworkManager --pid-file=/var/run/NetworkManager/NetworkManager.pid
root 1449 0.0 0.0 58064 2180 ? S Aug21 0:00 /usr/sbin/modem-manager
rpcuser 1464 0.0 0.0 23348 1328 ? Ss Aug21 0:00 rpc.statd
root 1508 0.0 0.0 0 0 ? S Aug21 0:00 [rpciod/0]
root 1524 0.0 0.0 23092 504 ? Ss Aug21 0:00 rpc.idmapd
root 1547 0.0 0.0 44972 660 ? Ss Aug21 0:00 /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -B -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid
root 1569 0.0 0.0 189200 2868 ? Ss Aug21 0:00 cupsd -C /etc/cups/cupsd.conf
root 1581 0.0 0.0 4080 644 ? Ss Aug21 0:00 /usr/sbin/acpid
68 1590 0.0 0.0 38924 3568 ? Ssl Aug21 0:07 hald
root 1591 0.0 0.0 20328 1180 ? S Aug21 0:00 hald-runner
root 1647 0.0 0.0 22448 1080 ? S Aug21 0:00 hald-addon-input: Listening on /dev/input/event0 /dev/input/event2
68 1651 0.0 0.0 17936 1016 ? S Aug21 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
root 1691 0.0 0.1 206140 5288 ? Ss Aug21 0:41 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)
www 1692 0.0 0.1 206140 5012 ? S Aug21 0:00 php-fpm: pool www
www 1693 0.0 0.1 206140 5012 ? S Aug21 0:00 php-fpm: pool www
root 1711 0.0 0.0 64400 1212 ? Ss Aug21 0:00 /usr/sbin/sshd
root 1719 0.0 0.0 22096 948 ? Ss Aug21 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
ntp 1727 0.0 0.0 26496 1904 ? Ss Aug21 0:02 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
root 1803 0.3 6.4 1013428 262396 ? Sl Aug21 58:22 prosvc
root 1890 0.0 0.0 110308 924 ? Ss Aug21 0:00 /usr/sbin/abrtd
root 1898 0.0 0.0 117240 1328 ? Ss Aug21 0:07 crond
root 1909 0.0 0.0 21456 580 ? Ss Aug21 0:00 /usr/sbin/atd
root 1967 0.0 0.0 62204 576 ? Ss Aug21 0:03 /usr/sbin/certmonger -S -p /var/run/certmonger.pid
root 1982 0.0 0.0 81384 2844 ? Ss Aug21 0:00 login -- root
root 1984 0.0 0.0 4064 528 tty2 Ss+ Aug21 0:00 /sbin/mingetty /dev/tty2
root 1986 0.0 0.0 4064 528 tty3 Ss+ Aug21 0:00 /sbin/mingetty /dev/tty3
root 1988 0.0 0.0 4064 524 tty4 Ss+ Aug21 0:00 /sbin/mingetty /dev/tty4
root 1990 0.0 0.0 4064 524 tty5 Ss+ Aug21 0:00 /sbin/mingetty /dev/tty5
root 1992 0.0 0.0 4064 528 tty6 Ss+ Aug21 0:00 /sbin/mingetty /dev/tty6
VSZ:進程佔用的虛擬內存大小(kb)RSS:進程佔用的物理內存大小(kb)
STAT:狀態碼
D: 不可中斷的睡眠進程(比如說IO)
R: 正在運行的或可運行的進程(在運行隊列中)
S: 可中斷的睡眠進程(等待事件完成)
T: 已停止的進程(比如說Ctrl+Z停止的進程)
X: 已終止的進程
Z:“zombie”殭屍進程,Defunct process
< : 高優先級進程
N : 低優先級進程
L : 有分頁被鎖進內存的進程
s : session leader進程
l : 有多線程的進程
+ : 前臺進程組
pstree:顯示進程樹
[root@unp ~]# pstree
init─┬─.ruby.bin───9*[{.ruby.bin}]
├─NetworkManager
├─abrtd
├─acpid
├─atd
├─auditd───{auditd}
├─certmonger
├─console-kit-dae───63*[{console-kit-da}]
├─crond
├─cupsd
├─dbus-daemon
├─hald─┬─hald-runner─┬─hald-addon-acpi
│ │ └─hald-addon-inpu
│ └─{hald}
├─login───bash
├─5*[mingetty]
├─modem-manager
├─mysqld_safe───mysqld───15*[{mysqld}]
├─nginx───4*[nginx]
├─ntpd
├─php-fpm───2*[php-fpm]
├─polkitd
├─rpc.idmapd
├─rpc.statd
├─rpcbind
├─rsyslogd───4*[{rsyslogd}]
├─sshd─┬─sshd─┬─bash───mysql
│ │ └─bash
│ └─sshd─┬─bash───pstree
│ └─bash───vim
├─udevd───2*[udevd]
├─wpa_supplicant
└─xinetd
pgrep sshd列出指定進程的PID
[root@unp ~]# pgrep sshd
1711
2058
2713
pidof 查看指定程序的pid
[root@unp ~]# pidof sshd
2713 2058 1711
top: 用於實時顯示進程信息
top - 10:28:20 up 12 days, 54 min, 5 users, load average: 0.00, 0.00, 0.00
Tasks: 117 total, 1 running, 115 sleeping, 1 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4057140k total, 1835332k used, 2221808k free, 280036k buffers
Swap: 4128760k total, 0k used, 4128760k free, 1021048k cachedPID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1803 root 20 0 989m 256m 5700 S 0.3 6.5 58:32.80 .ruby.bin
1 root 20 0 17128 1316 1068 S 0.0 0.0 0:01.06 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 0:06.64 ksoftirqd/0
5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
6 root RT 0 0 0 0 S 0.0 0.0 0:02.31 watchdog/0
7 root 20 0 0 0 0 S 0.0 0.0 1:07.83 events/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cgroup
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm
13 root 20 0 0 0 0 S 0.0 0.0 0:11.58 sync_supers
14 root 20 0 0 0 0 S 0.0 0.0 0:05.08 bdi-default
15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/0
16 root 20 0 0 0 0 S 0.0 0.0 0:10.62 kblockd/0
17 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kacpid
18 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kacpi_notify
19 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kacpi_hotplug
20 root 20 0 0 0 0 S 0.0 0.0 0:00.06 ata/0
21 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ata_aux
22 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksuspend_usbd
23 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khubd
24 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 md/0
26 root 20 0 0 0 0 S 0.0 0.0 0:00.00 md_misc/0
27 root 20 0 0 0 0 S 0.0 0.0 0:00.49 khungtaskd
28 root 20 0 0 0 0 S 0.0 0.0 0:01.05 kswapd0
29 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd
30 root 39 19 0 0 0 S 0.0 0.0 0:03.64 khugepaged
31 root 20 0 0 0 0 S 0.0 0.0 0:00.00 aio/0
32 root 20 0 0 0 0 S 0.0 0.0 0:00.00 crypto/0
37 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthrotld/0
38 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pciehpd
40 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kpsmoused
41 root 20 0 0 0 0 S 0.0 0.0 0:00.00 usbhid_resumer
72 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kstriped
263 root 20 0 0 0 0 S 0.0 0.0 0:00.01 scsi_eh_0
265 root 20 0 0 0 0 S 0.0 0.0 0:00.01 scsi_eh_1
273 root 20 0 0 0 0 S 0.0 0.0 0:21.37 mpt_poll_0
274 root 20 0 0 0 0 S 0.0 0.0 0:00.00 mpt/0M:按內存百分比大小排序
P:按CPU佔用百分比大小排序
T:按CPU累積時間大小排序
l: 是否顯示負載信息
t: 是否顯示cpu和進程的統計信息
m: 是否顯示內存摘要信息
q: 退出
k: 輸入一個進程id,回車終止一個進程
s: 改變top刷新時間間隔
htop交互式進程查看器
vmstat 查看虛擬內存狀態
[root@unp ~]# vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 2221560 280040 1021236 0 0 3 13 19 30 0 0 99 0 0
procs:
r:等待運行的進程個數
b:阻塞的進程個數
memory:
swpd: 使用的虛擬內存的大小(kb)
free: 空閒的物理內存大小
buff: 已使用的物理內存的緩存大小
cache: 已使用的物理內存的高速緩衝區大小
swap:
si: 從磁盤讀入交換分區的大小
so: 從交換分區寫入磁盤的大小
io:
bi:塊設備接收到的數據大小(通常是寫)
bo:塊設備發送的數據大小(通常是讀)
system:
in: cpu每秒的中斷次數
cs: cpu每秒的上下文切換次數(比如,線程切換,系統調用)
cpu:
us:用戶cpu時間
sy:系統cpu時間
id:空閒cpu時間
wa:等待io的cpu時間
vmstat –d: 顯示磁盤狀態
[root@unp ~]# vmstat -d
disk- ------------reads------------ ------------writes----------- -----IO------
total merged sectors ms total merged sectors ms cur sec
ram0 0 0 0 0 0 0 0 0 0 0
ram1 0 0 0 0 0 0 0 0 0 0
ram2 0 0 0 0 0 0 0 0 0 0
ram3 0 0 0 0 0 0 0 0 0 0
ram4 0 0 0 0 0 0 0 0 0 0
ram5 0 0 0 0 0 0 0 0 0 0
ram6 0 0 0 0 0 0 0 0 0 0
ram7 0 0 0 0 0 0 0 0 0 0
ram8 0 0 0 0 0 0 0 0 0 0
ram9 0 0 0 0 0 0 0 0 0 0
ram10 0 0 0 0 0 0 0 0 0 0
ram11 0 0 0 0 0 0 0 0 0 0
ram12 0 0 0 0 0 0 0 0 0 0
ram13 0 0 0 0 0 0 0 0 0 0
ram14 0 0 0 0 0 0 0 0 0 0
ram15 0 0 0 0 0 0 0 0 0 0
loop0 0 0 0 0 0 0 0 0 0 0
loop1 0 0 0 0 0 0 0 0 0 0
loop2 0 0 0 0 0 0 0 0 0 0
loop3 0 0 0 0 0 0 0 0 0 0
loop4 0 0 0 0 0 0 0 0 0 0
loop5 0 0 0 0 0 0 0 0 0 0
loop6 0 0 0 0 0 0 0 0 0 0
loop7 0 0 0 0 0 0 0 0 0 0
sr0 367 1096 5852 1129 0 0 0 0 0 1
sda 83945 22568 5369754 82959 550099 2587381 25102338 711942 0 233
sdb 3323 8273 24120 514 4388 425103 429512 25046 0 1
sdc 2709 167 23210 377 1204 29953 805000 51734 0 2
sdd 1856 128 16024 220 32 0 264 6 0 0
sde 6858 13997 49078 931 454 40587 66286 1713 0 0
dm-0 102868 0 5340826 204709 3137978 0 25591504 55113403 0 230
dm-1 719 0 5752 1560 7 0 56 21 0 1
dm-2 1076 0 8602 1582 518 0 4144 362 0 0
dm-3 1734 0 1962 1703 0 0 0 0 0 0
vmstat 2 10 每兩秒刷新一次,顯示10次
[root@unp ~]# vmstat 2 10
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 0 2221064 280040 1021708 0 0 3 13 19 30 0 0 99 0 0
0 0 0 2221056 280040 1021708 0 0 0 0 29 51 0 0 100 0 0
0 0 0 2221056 280040 1021708 0 0 0 0 25 47 1 0 100 0 0
0 0 0 2221056 280040 1021708 0 0 0 0 26 47 0 0 100 0 0
0 0 0 2221056 280040 1021712 0 0 0 0 31 45 1 0 99 0 0
0 0 0 2221056 280040 1021712 0 0 0 0 25 48 0 0 100 0 0
0 0 0 2221056 280040 1021712 0 0 0 20 28 55 0 0 100 0 0
0 0 0 2221056 280040 1021712 0 0 0 0 26 48 0 0 100 0 0
0 0 0 2221056 280040 1021712 0 0 0 0 26 48 0 0 100 0 0
0 0 0 2221056 280040 1021712 0 0 0 0 24 46 0 0 100 0 0
iostat 報告cpu狀態、設備和網各輸入輸出狀態
[root@unp ~]# iostat
Linux 2.6.32-358.el6.x86_64 (unp) 09/02/2014 _x86_64_ (1 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
0.42 0.00 0.10 0.01 0.00 99.47
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
scd0 0.00 0.01 0.00 5852 0
sda 0.61 5.15 24.11 5369754 25126922
sdb 0.01 0.02 0.41 24120 429512
sdc 0.00 0.02 0.77 23210 805000
sdd 0.00 0.02 0.00 16024 264
sde 0.01 0.05 0.06 49078 66286
dm-0 3.11 5.12 24.58 5340826 25616088
dm-1 0.00 0.01 0.00 5752 56
dm-2 0.00 0.01 0.00 8602 4144
dm-3 0.00 0.00 0.00 1962 0
cpu利用率報告:
%user: 用戶空間cpu時間利用率百分比
%nice: 用戶空間cpu時間利用率百分比(擁用nice優先級)
%system: 系統空間CPU時間利用率百分比
%iowait: cpu等待IO所佔的百分比
%idle: cpu空閒時間百分比
磁盤利用率報告:
Device: 塊設備名
tps: 每秒的IO請求數
Blk_read/s: 每秒從塊設備讀取的block數量
Blk_wrtn/s: 每秒寫入塊設備的block數量
Blk_read: 讀取block的總數
Blk_wrtn: 寫入block的總數
dstat: 用於產生系統資源狀態報告,用於替代vmstat和iostat
-c : 啓用cpu狀態
-C 0,3,total: 包含cpu0 cpu3,total的CPU狀態
-d:啓用磁盤狀態
-g: 啓用分頁狀態
-l:啓用負載
-m: 啓用內存狀態
-n:啓用網絡狀態
-N eth1: 啓用eth1網卡的網絡狀態
-p:啓用進程狀態
-r:啓用io請求狀態
-s:啓用swap狀態
-t:啓用時間輸出
-y:啓用系統狀態(CPU中斷次數,CPU切換上下文)
--socket:啓用socket狀態
--tcp:啓用tcp狀態
--udp:啓用udp狀態
--fs:啓用文件系統狀態
--ipc:啓用ipc狀態
--lock:啓用文件鎖狀態
dstat
[root@unp ~]# dstat
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
0 0 99 0 0 0|2685B 13k| 0 0 | 0 0 | 101 194
2 0 98 0 0 0| 0 0 | 60B 826B| 0 0 | 43 43
0 0 100 0 0 0| 0 0 | 60B 346B| 0 0 | 24 45
dstat –socket –tcp --udp顯示所有的tcp udp socket連接狀態
[root@unp ~]# dstat --socket --tcp --udp
------sockets------ ----tcp-sockets---- --udp--
tot tcp udp raw frg|lis act syn tim clo|lis act
149 8 10 0 0| 11 2 0 0 0| 17 0
149 8 10 0 0| 11 2 0 0 0| 17 0^C
kill:終止一個進程
常用的幾個信號:
1: SIGHUP,讓程序重讀配置文件,而不是重啓程序
2: SIGINT,中斷信號,Ctrl + c即發送此信號
9: SIGKILL,殺死進程
15: SIGTERM,終止進程
kill –n pid 殺死進程
n爲對應的信號數字
linux作業控制:bg fg nohup
linux執行命令的方式有兩種:
前臺執行:直接在終端輸入命令,回車
後臺執行:直接在終端輸入命令,後跟一個&,回車
通過jobs查看作業號
[root@unp ~]# jobs
[1]+ Stopped vim /tmp/name_list把後臺作業移至前臺
fg %1
把前臺作業移至後臺
bg %1
終止作業
kill %1
執行COMMAND &時,當退出當前會話時,作業也會終止,如果希望用戶退也終端之後COMMAND在後臺繼續執行,則需要這樣:
nohup COMMAND &
killall:根據進程名稱殺死進程
killall sshd:殺死sshd進程
pmap:查看進程的內存映射
[root@unp ~]# pmap `pidof init`
1: /sbin/init
00007f5a2038d000 1580K r-x-- /lib64/libc-2.12.so
00007f5a20518000 2044K ----- /lib64/libc-2.12.so
00007f5a20717000 16K r---- /lib64/libc-2.12.so
00007f5a2071b000 4K rw--- /lib64/libc-2.12.so
00007f5a2071c000 20K rw--- [ anon ]
00007f5a20721000 88K r-x-- /lib64/libgcc_s-4.4.7-20120601.so.1
00007f5a20737000 2044K ----- /lib64/libgcc_s-4.4.7-20120601.so.1
00007f5a20936000 4K rw--- /lib64/libgcc_s-4.4.7-20120601.so.1
00007f5a20937000 28K r-x-- /lib64/librt-2.12.so
00007f5a2093e000 2044K ----- /lib64/librt-2.12.so
00007f5a20b3d000 4K r---- /lib64/librt-2.12.so
00007f5a20b3e000 4K rw--- /lib64/librt-2.12.so
00007f5a20b3f000 92K r-x-- /lib64/libpthread-2.12.so
00007f5a20b56000 2048K ----- /lib64/libpthread-2.12.so
00007f5a20d56000 4K r---- /lib64/libpthread-2.12.so
00007f5a20d57000 4K rw--- /lib64/libpthread-2.12.so
00007f5a20d58000 16K rw--- [ anon ]
00007f5a20d5c000 256K r-x-- /lib64/libdbus-1.so.3.4.0
00007f5a20d9c000 2044K ----- /lib64/libdbus-1.so.3.4.0
00007f5a20f9b000 4K r---- /lib64/libdbus-1.so.3.4.0
00007f5a20f9c000 4K rw--- /lib64/libdbus-1.so.3.4.0
00007f5a20f9d000 36K r-x-- /lib64/libnih-dbus.so.1.0.0
00007f5a20fa6000 2044K ----- /lib64/libnih-dbus.so.1.0.0
00007f5a211a5000 4K r---- /lib64/libnih-dbus.so.1.0.0
00007f5a211a6000 4K rw--- /lib64/libnih-dbus.so.1.0.0
00007f5a211a7000 96K r-x-- /lib64/libnih.so.1.0.0
00007f5a211bf000 2044K ----- /lib64/libnih.so.1.0.0
00007f5a213be000 4K r---- /lib64/libnih.so.1.0.0
00007f5a213bf000 4K rw--- /lib64/libnih.so.1.0.0
00007f5a213c0000 128K r-x-- /lib64/ld-2.12.so
00007f5a215c5000 20K rw--- [ anon ]
00007f5a215de000 4K rw--- [ anon ]
00007f5a215df000 4K r---- /lib64/ld-2.12.so
00007f5a215e0000 4K rw--- /lib64/ld-2.12.so
00007f5a215e1000 4K rw--- [ anon ]
00007f5a215e2000 140K r-x-- /sbin/init
00007f5a21804000 8K r---- /sbin/init
00007f5a21806000 4K rw--- /sbin/init
00007f5a2256c000 132K rw--- [ anon ]
00007fffab2fb000 84K rw--- [ stack ]
00007fffab384000 4K r-x-- [ anon ]
ffffffffff600000 4K r-x-- [ anon ]
total 17128K
nice renice修改進程優先級
優先級的範圍-20到19,默認nice 爲0
未啓動進程: nice –n 3 COMMAND
已啓動的進程: renice 3 COMMAND