1.進程概念
1.在Linux中,每一個程序都有自己的一個進程,每一個進程都有一個id號
2. 每一個進程都會有一個父進程
3.服務在後臺進行,程序一般在前臺進行。
2. ps 查看當前系統正在進行的各種進程信息
格式: ps 選項
- -a 顯示當前終端運行的所有進程信息
- -u 以用戶的信息顯示進程
- -x 顯示後臺運行進程的參數
[root@wangstudy /]# ps -x
PID TTY STAT TIME COMMAND
1 ? Ss 0:25 /usr/lib/systemd/systemd --system --deserialize 17
2 ? S 0:00 [kthreadd]
4 ? S< 0:00 [kworker/0:0H]
5 ? S 0:00 [kworker/u4:0]
6 ? S 0:00 [ksoftirqd/0]
7 ? S 0:00 [migration/0]
8 ? S 0:00 [rcu_bh]
9 ? S 1:05 [rcu_sched]
10 ? S< 0:00 [lru-add-drain]
11 ? S 0:00 [watchdog/0]
12 ? S 0:00 [watchdog/1]
13 ? S 0:00 [migration/1]
14 ? S 0:00 [ksoftirqd/1]
16 ? S< 0:00 [kworker/1:0H]
18 ? S 0:00 [kdevtmpfs]
19 ? S< 0:00 [netns]
20 ? S 0:00 [khungtaskd]
21 ? S< 0:00 [writeback]
22 ? S< 0:00 [kintegrityd]
23 ? S< 0:00 [bioset]
24 ? S< 0:00 [bioset]
25 ? S< 0:00 [bioset]
26 ? S< 0:00 [kblockd]
27 ? S< 0:00 [md]
28 ? S< 0:00 [edac-poller]
29 ? S< 0:00 [watchdogd]
36 ? S 0:00 [kswapd0]
37 ? SN 0:00 [ksmd]
38 ? SN 0:00 [khugepaged]
39 ? S< 0:00 [crypto]
47 ? S< 0:00 [kthrotld]
49 ? S< 0:00 [kmpath_rdacd]
50 ? S< 0:00 [kaluad]
51 ? S< 0:00 [kpsmoused]
53 ? S< 0:00 [ipv6_addrconf]
66 ? S< 0:00 [deferwq]
101 ? S 0:00 [kauditd]
229 ? S< 0:00 [ata_sff]
301 ? S 0:00 [scsi_eh_0]
302 ? S< 0:00 [scsi_tmf_0]
304 ? S 0:00 [scsi_eh_1]
305 ? S< 0:00 [scsi_tmf_1]
314 ? S< 0:00 [ttm_swap]
321 ? S< 0:01 [kworker/0:1H]
331 ? S< 0:00 [kworker/1:1H]
332 ? S 0:03 [jbd2/vda1-8]
333 ? S< 0:00 [ext4-rsv-conver]
426 ? Ss 0:00 /usr/lib/systemd/systemd-journald
462 ? Ss 0:00 /usr/lib/systemd/systemd-udevd
475 ? S<sl 0:00 /sbin/auditd
637 ? Ss 0:00 /usr/lib/systemd/systemd-logind
640 ? S< 0:00 [nfit]
902 ? Ds 0:00 sshd: root@pts/2
904 pts/2 Ss 0:00 -bash
914 ? Ss 0:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient--eth0.lease -pf /var/run/dhclient-eth0.pid -H i
971 ? Ssl 0:13 /usr/bin/python2 -Es /usr/sbin/tuned -l -P
1021 ? Ssl 3:34 /usr/sbin/aliyun-service
1023 ? Ssl 0:06 /usr/sbin/rsyslogd -n
1027 ? Ss 0:00 /usr/sbin/sshd -D
1034 ? Ss 0:00 /usr/sbin/atd -f
1037 ttyS0 Ss+ 0:00 /sbin/agetty --keep-baud 115200,38400,9600 ttyS0 vt220
1038 tty1 Ss+ 0:00 /sbin/agetty --noclear tty1 linux
1058 ? Ssl 0:56 /usr/local/aegis/aegis_update/AliYunDunUpdate
1120 ? S<sl 31:41 /usr/local/aegis/aegis_client/aegis_10_79/AliYunDun
1247 pts/2 R+ 0:00 ps -x
2341 ? Sl 1:20 /usr/bin/python /www/server/panel/BT-Task
2356 ? Sl 0:30 /usr/bin/python /www/server/panel/BT-Panel
2514 ? Ssl 0:03 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid
3038 ? Ss 0:00 /usr/sbin/crond -n
3740 ? Ss 0:03 /sbin/rngd -f
13361 ? R 0:01 [kworker/1:1]
16338 ? S 0:04 [kworker/0:2]
18952 ? S 0:00 /bin/sh /www/server/mysql/bin/mysqld_safe --datadir=/www/server/data --pid-file=/www/server/data/iZ
19389 ? Ss 0:05 /www/server/apache/bin/httpd -k start
19882 ? S 0:01 [kworker/u4:2]
22061 ? Ss 0:00 sshd: root@pts/0
22064 pts/0 Ss+ 0:00 -bash
30750 ? S 0:00 [kworker/1:0]
30752 ? S 0:00 [kworker/0:1]
- -aux 查看所有進程
[root@wangstudy /]# ps -aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 52056 4168 ? Ss May30 0:25 /usr/lib/systemd/systemd --system --deserialize 17
root 2 0.0 0.0 0 0 ? S May30 0:00 [kthreadd]
root 4 0.0 0.0 0 0 ? S< May30 0:00 [kworker/0:0H]
root 5 0.0 0.0 0 0 ? S May30 0:00 [kworker/u4:0]
root 6 0.0 0.0 0 0 ? S May30 0:00 [ksoftirqd/0]
root 7 0.0 0.0 0 0 ? S May30 0:00 [migration/0]
root 8 0.0 0.0 0 0 ? S May30 0:00 [rcu_bh]
root 9 0.0 0.0 0 0 ? S May30 1:05 [rcu_sched]
root 10 0.0 0.0 0 0 ? S< May30 0:00 [lru-add-drain]
root 11 0.0 0.0 0 0 ? S May30 0:00 [watchdog/0]
root 12 0.0 0.0 0 0 ? S May30 0:00 [watchdog/1]
root 13 0.0 0.0 0 0 ? S May30 0:00 [migration/1]
root 14 0.0 0.0 0 0 ? S May30 0:00 [ksoftirqd/1]
root 16 0.0 0.0 0 0 ? S< May30 0:00 [kworker/1:0H]
root 18 0.0 0.0 0 0 ? S May30 0:00 [kdevtmpfs]
root 19 0.0 0.0 0 0 ? S< May30 0:00 [netns]
root 20 0.0 0.0 0 0 ? S May30 0:00 [khungtaskd]
root 21 0.0 0.0 0 0 ? S< May30 0:00 [writeback]
root 22 0.0 0.0 0 0 ? S< May30 0:00 [kintegrityd]
root 23 0.0 0.0 0 0 ? S< May30 0:00 [bioset]
root 24 0.0 0.0 0 0 ? S< May30 0:00 [bioset]
root 25 0.0 0.0 0 0 ? S< May30 0:00 [bioset]
root 26 0.0 0.0 0 0 ? S< May30 0:00 [kblockd]
root 27 0.0 0.0 0 0 ? S< May30 0:00 [md]
root 28 0.0 0.0 0 0 ? S< May30 0:00 [edac-poller]
root 29 0.0 0.0 0 0 ? S< May30 0:00 [watchdogd]
root 36 0.0 0.0 0 0 ? S May30 0:00 [kswapd0]
root 37 0.0 0.0 0 0 ? SN May30 0:00 [ksmd]
root 38 0.0 0.0 0 0 ? SN May30 0:00 [khugepaged]
root 39 0.0 0.0 0 0 ? S< May30 0:00 [crypto]
root 47 0.0 0.0 0 0 ? S< May30 0:00 [kthrotld]
root 49 0.0 0.0 0 0 ? S< May30 0:00 [kmpath_rdacd]
root 50 0.0 0.0 0 0 ? S< May30 0:00 [kaluad]
root 51 0.0 0.0 0 0 ? S< May30 0:00 [kpsmoused]
root 53 0.0 0.0 0 0 ? S< May30 0:00 [ipv6_addrconf]
root 66 0.0 0.0 0 0 ? S< May30 0:00 [deferwq]
root 101 0.0 0.0 0 0 ? S May30 0:00 [kauditd]
root 229 0.0 0.0 0 0 ? S< May30 0:00 [ata_sff]
root 301 0.0 0.0 0 0 ? S May30 0:00 [scsi_eh_0]
root 302 0.0 0.0 0 0 ? S< May30 0:00 [scsi_tmf_0]
root 304 0.0 0.0 0 0 ? S May30 0:00 [scsi_eh_1]
root 305 0.0 0.0 0 0 ? S< May30 0:00 [scsi_tmf_1]
root 314 0.0 0.0 0 0 ? S< May30 0:00 [ttm_swap]
root 321 0.0 0.0 0 0 ? S< May30 0:01 [kworker/0:1H]
root 331 0.0 0.0 0 0 ? S< May30 0:00 [kworker/1:1H]
root 332 0.0 0.0 0 0 ? S May30 0:03 [jbd2/vda1-8]
root 333 0.0 0.0 0 0 ? S< May30 0:00 [ext4-rsv-conver]
root 426 0.0 0.2 48392 11016 ? Ss May30 0:00 /usr/lib/systemd/systemd-journald
root 462 0.0 0.0 44688 1816 ? Ss May30 0:00 /usr/lib/systemd/systemd-udevd
root 475 0.0 0.0 55528 888 ? S<sl May30 0:00 /sbin/auditd
dbus 500 0.0 0.0 58252 2496 ? Ss May30 0:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --n
root 637 0.0 0.0 26512 1904 ? Ss May30 0:00 /usr/lib/systemd/systemd-logind
polkitd 639 0.0 0.3 613016 13036 ? Ssl May30 0:00 /usr/lib/polkit-1/polkitd --no-debug
root 640 0.0 0.0 0 0 ? S< May30 0:00 [nfit]
chrony 671 0.0 0.0 117924 1872 ? S May30 0:00 /usr/sbin/chronyd
root 902 0.0 0.1 157320 5916 ? Ds 13:58 0:00 sshd: root@pts/2
root 904 0.0 0.0 115548 2076 pts/2 Ss 13:58 0:00 -bash
root 914 0.0 0.0 102896 2360 ? Ss May30 0:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient--eth0.lea
root 971 0.0 0.5 574196 19452 ? Ssl May30 0:13 /usr/bin/python2 -Es /usr/sbin/tuned -l -P
root 1021 0.2 0.0 50048 3376 ? Ssl May30 3:34 /usr/sbin/aliyun-service
root 1023 0.0 0.1 239144 4428 ? Ssl May30 0:06 /usr/sbin/rsyslogd -n
root 1027 0.0 0.1 112920 4324 ? Ss May30 0:00 /usr/sbin/sshd -D
root 1034 0.0 0.0 25908 936 ? Ss May30 0:00 /usr/sbin/atd -f
root 1037 0.0 0.0 110108 864 ttyS0 Ss+ May30 0:00 /sbin/agetty --keep-baud 115200,38400,9600 ttyS0 vt220
root 1038 0.0 0.0 110108 856 tty1 Ss+ May30 0:00 /sbin/agetty --noclear tty1 linux
root 1058 0.0 0.1 32524 3940 ? Ssl May30 0:56 /usr/local/aegis/aegis_update/AliYunDunUpdate
root 1120 1.8 0.7 142652 30284 ? S<sl May30 31:42 /usr/local/aegis/aegis_client/aegis_10_79/AliYunDun
root 1317 0.0 0.0 155476 1872 pts/2 R+ 14:05 0:00 ps -aux
root 2341 0.0 1.2 824804 49896 ? Sl May30 1:20 /usr/bin/python /www/server/panel/BT-Task
root 2356 0.0 1.5 450272 61820 ? Sl May30 0:30 /usr/bin/python /www/server/panel/BT-Panel
root 2514 0.0 0.8 362780 33816 ? Ssl May30 0:03 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid
root 3038 0.0 0.0 126388 1604 ? Ss May30 0:00 /usr/sbin/crond -n
root 3740 0.0 0.0 90568 3204 ? Ss May30 0:03 /sbin/rngd -f
redis 9246 0.1 0.1 153996 7656 ? Ssl May30 2:31 /www/server/redis/src/redis-server 127.0.0.1:6379
root 13361 0.0 0.0 0 0 ? S May30 0:01 [kworker/1:1]
root 16338 0.0 0.0 0 0 ? S May30 0:04 [kworker/0:2]
root 18952 0.0 0.0 11824 1584 ? S May30 0:00 /bin/sh /www/server/mysql/bin/mysqld_safe --datadir=/www/serv
root 19389 0.0 0.9 167656 37448 ? Ss May30 0:05 /www/server/apache/bin/httpd -k start
www 19392 0.0 0.1 825812 6220 ? Sl May30 0:00 /www/server/apache/bin/httpd -k start
www 19393 0.0 0.1 825812 6220 ? Sl May30 0:00 /www/server/apache/bin/httpd -k start
www 19394 0.0 0.1 825812 6220 ? Sl May30 0:00 /www/server/apache/bin/httpd -k start
mysql 19760 0.0 6.7 1721332 263544 ? Sl May30 1:02 /www/server/mysql/bin/mysqld --basedir=/www/server/mysql --da
root 19882 0.0 0.0 0 0 ? S May30 0:01 [kworker/u4:2]
root 22061 0.0 0.1 157324 5920 ? Ss 10:11 0:00 sshd: root@pts/0
root 22064 0.0 0.0 115548 2084 pts/0 Ss+ 10:11 0:00 -bash
root 30750 0.0 0.0 0 0 ? S 02:14 0:00 [kworker/1:0]
root 30752 0.0 0.0 0 0 ? S 02:14 0:00 [kworker/0:1]
- -aux| grep mysql(|表示管道符,grep查找字符串)
- -ef 查看父進程信息 ,我們常需要樹結構來查看
pstree
- -p 顯示父id
- -u 用戶組
[root@wangstudy ~]# pstree -pu
systemd(1)─┬─AliYunDun(1120)─┬─{AliYunDun}(1121)
│ ├─{AliYunDun}(1122)
│ ├─{AliYunDun}(1136)
│ ├─{AliYunDun}(1137)
│ ├─{AliYunDun}(1138)
│ ├─{AliYunDun}(1139)
│ ├─{AliYunDun}(1140)
│ ├─{AliYunDun}(1145)
│ ├─{AliYunDun}(1147)
│ ├─{AliYunDun}(1148)
│ ├─{AliYunDun}(1149)
│ ├─{AliYunDun}(1150)
│ ├─{AliYunDun}(1151)
│ ├─{AliYunDun}(1152)
│ ├─{AliYunDun}(1153)
│ ├─{AliYunDun}(1163)
│ ├─{AliYunDun}(1164)
│ ├─{AliYunDun}(1165)
│ ├─{AliYunDun}(1166)
│ ├─{AliYunDun}(1167)
│ ├─{AliYunDun}(1168)
│ └─{AliYunDun}(1169)
├─AliYunDunUpdate(1058)─┬─{AliYunDunUpdate}(1066)
│ ├─{AliYunDunUpdate}(1068)
│ └─{AliYunDunUpdate}(1089)
├─BT-Panel(2356)───{BT-Panel}(2362)
├─BT-Task(2341)─┬─{BT-Task}(2344)
│ ├─{BT-Task}(2345)
│ ├─{BT-Task}(2346)
│ ├─{BT-Task}(2347)
│ ├─{BT-Task}(2348)
│ └─{BT-Task}(2349)
├─agetty(1037)
├─agetty(1038)
├─aliyun-service(1021)─┬─{aliyun-service}(1096)
│ └─{aliyun-service}(1097)
├─atd(1034)
├─auditd(475)───{auditd}(476)
├─chronyd(671,chrony)
├─crond(3038)
├─dbus-daemon(500,dbus)
├─dhclient(914)
├─firewalld(2514)───{firewalld}(2606)
├─httpd(19389)─┬─httpd(19392,www)─┬─{httpd}(19471)
│ │ ├─{httpd}(19472)
│ │ ├─{httpd}(19473)
│ │ ├─{httpd}(19474)
│ │ ├─{httpd}(19475)
│ │ ├─{httpd}(19476)
│ │ ├─{httpd}(19477)
│ │ ├─{httpd}(19478)
│ │ ├─{httpd}(19479)
│ │ ├─{httpd}(19480)
│ │ ├─{httpd}(19481)
│ │ ├─{httpd}(19482)
│ │ ├─{httpd}(19483)
│ │ ├─{httpd}(19484)
│ │ ├─{httpd}(19485)
│ │ ├─{httpd}(19486)
│ │ ├─{httpd}(19487)
│ │ ├─{httpd}(19488)
│ │ ├─{httpd}(19489)
│ │ ├─{httpd}(19490)
│ │ ├─{httpd}(19491)
│ │ ├─{httpd}(19492)
│ │ ├─{httpd}(19493)
│ │ ├─{httpd}(19494)
│ │ ├─{httpd}(19495)
│ │ ├─{httpd}(19496)
│ │ ├─{httpd}(19497)
│ │ ├─{httpd}(19498)
│ │ ├─{httpd}(19499)
│ │ ├─{httpd}(19500)
│ │ ├─{httpd}(19501)
│ │ ├─{httpd}(19502)
│ │ ├─{httpd}(19503)
│ │ ├─{httpd}(19504)
│ │ ├─{httpd}(19505)
│ │ ├─{httpd}(19506)
│ │ ├─{httpd}(19507)
│ │ ├─{httpd}(19561)
│ │ ├─{httpd}(19562)
│ │ ├─{httpd}(19563)
│ │ ├─{httpd}(19564)
│ │ ├─{httpd}(19565)
│ │ ├─{httpd}(19566)
│ │ ├─{httpd}(19567)
│ │ ├─{httpd}(19568)
│ │ ├─{httpd}(19569)
│ │ ├─{httpd}(19570)
│ │ ├─{httpd}(19571)
│ │ ├─{httpd}(19572)
│ │ ├─{httpd}(19573)
│ │ ├─{httpd}(19574)
│ │ ├─{httpd}(19575)
│ │ ├─{httpd}(19576)
│ │ ├─{httpd}(19577)
│ │ ├─{httpd}(19578)
│ │ ├─{httpd}(19579)
│ │ ├─{httpd}(19580)
│ │ ├─{httpd}(19581)
│ │ ├─{httpd}(19582)
│ │ ├─{httpd}(19583)
│ │ ├─{httpd}(19584)
│ │ ├─{httpd}(19585)
│ │ └─{httpd}(19586)
│ ├─httpd(19393,www)─┬─{httpd}(19433)
│ │ ├─{httpd}(19434)
│ │ ├─{httpd}(19435)
│ │ ├─{httpd}(19436)
│ │ ├─{httpd}(19437)
│ │ ├─{httpd}(19438)
│ │ ├─{httpd}(19439)
│ │ ├─{httpd}(19440)
│ │ ├─{httpd}(19441)
│ │ ├─{httpd}(19442)
│ │ ├─{httpd}(19443)
│ │ ├─{httpd}(19444)
│ │ ├─{httpd}(19445)
│ │ ├─{httpd}(19446)
│ │ ├─{httpd}(19447)
│ │ ├─{httpd}(19448)
│ │ ├─{httpd}(19449)
│ │ ├─{httpd}(19450)
│ │ ├─{httpd}(19451)
│ │ ├─{httpd}(19452)
│ │ ├─{httpd}(19453)
│ │ ├─{httpd}(19454)
│ │ ├─{httpd}(19455)
│ │ ├─{httpd}(19456)
│ │ ├─{httpd}(19457)
│ │ ├─{httpd}(19458)
│ │ ├─{httpd}(19459)
│ │ ├─{httpd}(19460)
│ │ ├─{httpd}(19461)
│ │ ├─{httpd}(19462)
│ │ ├─{httpd}(19463)
│ │ ├─{httpd}(19464)
│ │ ├─{httpd}(19465)
│ │ ├─{httpd}(19466)
│ │ ├─{httpd}(19467)
│ │ ├─{httpd}(19468)
│ │ ├─{httpd}(19469)
│ │ ├─{httpd}(19535)
│ │ ├─{httpd}(19536)
│ │ ├─{httpd}(19537)
│ │ ├─{httpd}(19538)
│ │ ├─{httpd}(19539)
│ │ ├─{httpd}(19540)
│ │ ├─{httpd}(19541)
│ │ ├─{httpd}(19542)
│ │ ├─{httpd}(19543)
│ │ ├─{httpd}(19544)
│ │ ├─{httpd}(19545)
│ │ ├─{httpd}(19546)
│ │ ├─{httpd}(19547)
│ │ ├─{httpd}(19548)
│ │ ├─{httpd}(19549)
│ │ ├─{httpd}(19550)
│ │ ├─{httpd}(19551)
│ │ ├─{httpd}(19552)
│ │ ├─{httpd}(19553)
│ │ ├─{httpd}(19554)
│ │ ├─{httpd}(19555)
│ │ ├─{httpd}(19556)
│ │ ├─{httpd}(19557)
│ │ ├─{httpd}(19558)
│ │ ├─{httpd}(19559)
│ │ └─{httpd}(19560)
│ └─httpd(19394,www)─┬─{httpd}(19395)
│ ├─{httpd}(19396)
│ ├─{httpd}(19397)
│ ├─{httpd}(19398)
│ ├─{httpd}(19399)
│ ├─{httpd}(19400)
│ ├─{httpd}(19401)
│ ├─{httpd}(19402)
│ ├─{httpd}(19403)
│ ├─{httpd}(19404)
│ ├─{httpd}(19405)
│ ├─{httpd}(19406)
│ ├─{httpd}(19407)
│ ├─{httpd}(19408)
│ ├─{httpd}(19409)
│ ├─{httpd}(19410)
│ ├─{httpd}(19411)
│ ├─{httpd}(19412)
│ ├─{httpd}(19413)
│ ├─{httpd}(19414)
│ ├─{httpd}(19415)
│ ├─{httpd}(19416)
│ ├─{httpd}(19417)
│ ├─{httpd}(19418)
│ ├─{httpd}(19419)
│ ├─{httpd}(19420)
│ ├─{httpd}(19421)
│ ├─{httpd}(19422)
│ ├─{httpd}(19423)
│ ├─{httpd}(19424)
│ ├─{httpd}(19425)
│ ├─{httpd}(19426)
│ ├─{httpd}(19427)
│ ├─{httpd}(19428)
│ ├─{httpd}(19429)
│ ├─{httpd}(19430)
│ ├─{httpd}(19431)
│ ├─{httpd}(19509)
│ ├─{httpd}(19510)
│ ├─{httpd}(19511)
│ ├─{httpd}(19512)
│ ├─{httpd}(19513)
│ ├─{httpd}(19514)
│ ├─{httpd}(19515)
│ ├─{httpd}(19516)
│ ├─{httpd}(19517)
│ ├─{httpd}(19518)
│ ├─{httpd}(19519)
│ ├─{httpd}(19520)
│ ├─{httpd}(19521)
│ ├─{httpd}(19522)
│ ├─{httpd}(19523)
│ ├─{httpd}(19524)
│ ├─{httpd}(19525)
│ ├─{httpd}(19526)
│ ├─{httpd}(19527)
│ ├─{httpd}(19528)
│ ├─{httpd}(19529)
│ ├─{httpd}(19530)
│ ├─{httpd}(19531)
│ ├─{httpd}(19532)
│ ├─{httpd}(19533)
│ └─{httpd}(19534)
├─mysqld_safe(18952)───mysqld(19760,mysql)─┬─{mysqld}(19761)
│ ├─{mysqld}(19763)
│ ├─{mysqld}(19764)
│ ├─{mysqld}(19765)
│ ├─{mysqld}(19766)
│ ├─{mysqld}(19767)
│ ├─{mysqld}(19768)
│ ├─{mysqld}(19769)
│ ├─{mysqld}(19773)
│ ├─{mysqld}(19774)
│ ├─{mysqld}(19775)
│ ├─{mysqld}(19776)
│ ├─{mysqld}(19777)
│ ├─{mysqld}(19778)
│ ├─{mysqld}(19779)
│ ├─{mysqld}(19780)
│ ├─{mysqld}(19781)
│ ├─{mysqld}(19782)
│ ├─{mysqld}(19783)
│ ├─{mysqld}(19784)
│ ├─{mysqld}(19785)
│ ├─{mysqld}(19786)
│ ├─{mysqld}(19798)
│ ├─{mysqld}(20508)
│ ├─{mysqld}(20523)
│ ├─{mysqld}(21543)
│ ├─{mysqld}(24812)
│ ├─{mysqld}(25488)
│ ├─{mysqld}(25564)
│ ├─{mysqld}(25863)
│ └─{mysqld}(25865)
├─polkitd(639,polkitd)─┬─{polkitd}(695)
│ ├─{polkitd}(696)
│ ├─{polkitd}(697)
│ ├─{polkitd}(698)
│ ├─{polkitd}(699)
│ └─{polkitd}(700)
├─redis-server(9246,redis)─┬─{redis-server}(9247)
│ ├─{redis-server}(9248)
│ └─{redis-server}(9249)
├─rngd(3740)
├─rsyslogd(1023)─┬─{rsyslogd}(1040)
│ └─{rsyslogd}(1041)
├─sshd(1027)───sshd(902)───bash(904)───pstree(1962)
├─systemd-journal(426)
├─systemd-logind(637)
├─systemd-udevd(462)
└─tuned(971)─┬─{tuned}(1102)
├─{tuned}(1103)
├─{tuned}(1105)
└─{tuned}(1106)
3. 結束進程 kill
格式: kill -g 進程id