如何刪除找到並刪除父進程

[root@manager1 ]# ps -eo pid,ppid,cmd |grep rbd
 6205     2 [drbd3_submit]
 6209     2 [drbd_w_drbd_dai]
11867     2 [drbd_a_drbd_dai]
12412     2 [drbd-reissue]
12434     2 [drbd1_submit]
12450     2 [drbd_w_drbd_doc]
13309 11590 rbd cp sharepool/volume-03fd5d4c-7971-4ade-a4f2-4ac3b0c17b63 localpool/chang-test423(紅色爲父進程號)
15536     2 [drbd_r_drbd_dai]
15537     2 [drbd_r_drbd_doc]
15904     2 [drbd_a_drbd_doc]
23381     2 [jbd2/drbd3-8]
23386     2 [jbd2/drbd1-8]
40653  9788 grep --color=auto rbdbash

[root@manager1 ]# kill -s 9 11590   殺掉父進程

[root@manager1 ]# ps -eo pid,ppid,cmd |grep rbd
 3285  9788 grep --color=auto rbd
 6205     2 [drbd3_submit]
 6209     2 [drbd_w_drbd_dai]
11867     2 [drbd_a_drbd_dai]
12412     2 [drbd-reissue]
12434     2 [drbd1_submit]
12450     2 [drbd_w_drbd_doc]
13309     1 rbd cp sharepool/volume-03fd5d4c-7971-4ade-a4f2-4ac3b0c17b63 localpool/chang-test423
15536     2 [drbd_r_drbd_dai]
15537     2 [drbd_r_drbd_doc]
15904     2 [drbd_a_drbd_doc]
23381     2 [jbd2/drbd3-8]
23386     2 [jbd2/drbd1-8]spa

[root@manager1 include(keystone_admin)]# kill -s 9 13309  殺掉子進程
-bash: kill: (13309) - No such process
[root@manager1 include(keystone_admin)]#
[root@manager1 include(keystone_admin)]#
[root@manager1 include(keystone_admin)]#
[root@manager1 include(keystone_admin)]#
[root@manager1 include(keystone_admin)]# kill -s 9 13309
-bash: kill: (13309) - No such process
[root@manager1 include(keystone_admin)]# ps -eo pid,ppid,cmd |grep rbd (確認子進程已刪掉)
 4374  9788 grep --color=auto rbd
 6205     2 [drbd3_submit]
 6209     2 [drbd_w_drbd_dai]
11867     2 [drbd_a_drbd_dai]
12412     2 [drbd-reissue]
12434     2 [drbd1_submit]
12450     2 [drbd_w_drbd_doc]
15536     2 [drbd_r_drbd_dai]
15537     2 [drbd_r_drbd_doc]
15904     2 [drbd_a_drbd_doc]
23381     2 [jbd2/drbd3-8]
23386     2 [jbd2/drbd1-8]進程

相關文章
相關標籤/搜索