日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux进程管理命令kill,Linux进程管理命令-kill | IT运维网

發布時間:2024/7/19 linux 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux进程管理命令kill,Linux进程管理命令-kill | IT运维网 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

格式:kill -l [signal]

-l:顯示當前系統可用信號

-l:顯示當前系統可用信號

[root@localhost ~]# kill -l

1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP

6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL10) SIGUSR1

11) SIGSEGV12) SIGUSR213) SIGPIPE14) SIGALRM15) SIGTERM

16) SIGSTKFLT17) SIGCHLD18) SIGCONT19) SIGSTOP20) SIGTSTP

21) SIGTTIN22) SIGTTOU23) SIGURG24) SIGXCPU25) SIGXFSZ

26) SIGVTALRM27) SIGPROF28) SIGWINCH29) SIGIO30) SIGPWR

31) SIGSYS34) SIGRTMIN35) SIGRTMIN+136) SIGRTMIN+237) SIGRTMIN+3

38) SIGRTMIN+439) SIGRTMIN+540) SIGRTMIN+641) SIGRTMIN+742) SIGRTMIN+8

43) SIGRTMIN+944) SIGRTMIN+1045) SIGRTMIN+1146) SIGRTMIN+1247) SIGRTMIN+13

48) SIGRTMIN+1449) SIGRTMIN+1550) SIGRTMAX-1451) SIGRTMAX-1352) SIGRTMAX-12

53) SIGRTMAX-1154) SIGRTMAX-1055) SIGRTMAX-956) SIGRTMAX-857) SIGRTMAX-7

58) SIGRTMAX-659) SIGRTMAX-560) SIGRTMAX-461) SIGRTMAX-362) SIGRTMAX-2

63) SIGRTMAX-164) SIGRTMAX

常用信號:

1) SIGHUP: 無須關閉進程而讓其重讀配置文件;PID不變

2) SIGINT: 中斷正在運行的進程;相當于Ctrl+c;

9) SIGKILL: 殺死正在運行的進程;直接終止進程;謹慎

15) SIGTERM:終止正在運行的進程;進程終止前允許可保存數據;默認缺省信號

指定信號的方法:

(1) 信號的數字標識;1, 2, 9

(2) 信號完整名稱;SIGHUP

(3) 信號的簡寫名稱;HUP

格式:kill [-s signal|-p] [-q sigval] [-a] [–] pid…

編號 PID:指定信號模式編號管理進程;推薦用此模式操作

-signal PID:指定信號模式管理進程;

不指定信號為默認使用15信號

[root@localhost ~]# ps auxf |grep sshd

root 1698 0.0 0.0 112812 4280 ? Ss 00:58 0:00 /usr/sbin/sshd -D

root 1699 0.0 0.0 157208 5884 ? Ss 00:58 0:00 \_ sshd: root@pts/0

root 1876 0.0 0.0 112704 960 pts/0 S+ 01:29 0:00 | \_ grep --color=auto sshd

root 1851 0.0 0.0 157208 5816 ? Ss 01:29 0:00 \_ sshd: yvan [priv]

yvan 1853 0.0 0.0 157208 2300 ? S 01:29 0:00 \_ sshd: yvan@pts/1

[root@localhost ~]# kill 1851

[root@localhost ~]# ps auxf |grep sshd

root 1698 0.0 0.0 112812 4280 ? Ss 00:58 0:00 /usr/sbin/sshd -D

root 1699 0.0 0.0 157208 5884 ? Ss 00:58 0:00 \_ sshd: root@pts/0

root 1882 0.0 0.0 112704 960 pts/0 S+ 01:30 0:00 \_ grep --color=auto sshd

編號 PID:指定信號模式編號管理進程

[root@localhost ~]# ps auxf |grep sshd

root 1698 0.0 0.0 112812 4320 ? Ss 00:58 0:00 /usr/sbin/sshd -D

root 1699 0.0 0.0 157208 5884 ? Ss 00:58 0:00 \_ sshd: root@pts/0

root 1909 0.0 0.0 112704 964 pts/0 S+ 01:31 0:00 | \_ grep --color=auto sshd

root 1884 0.1 0.0 157208 5816 ? Ss 01:31 0:00 \_ sshd: yvan [priv]

yvan 1886 0.0 0.0 157208 2300 ? S 01:31 0:00 \_ sshd: yvan@pts/1

[root@localhost ~]# kill 2 1884

[root@localhost ~]# ps auxf |grep sshd

root 1698 0.0 0.0 112812 4320 ? Ss 00:58 0:00 /usr/sbin/sshd -D

root 1699 0.0 0.0 157208 5884 ? Ss 00:58 0:00 \_ sshd: root@pts/0

root 1913 0.0 0.0 112704 960 pts/0 S+ 01:32 0:00 \_ grep --color=auto sshd

signal PID:指定信號模式管理進程;信號模式可簡寫

[root@localhost ~]# ps auxf |grep sshd

root 1698 0.0 0.0 112812 4320 ? Ss 00:58 0:00 /usr/sbin/sshd -D

root 1699 0.0 0.0 157208 5884 ? Ss 00:58 0:00 \_ sshd: root@pts/0

root 2156 0.0 0.0 112704 960 pts/0 S+ 01:47 0:00 | \_ grep --color=auto sshd

root 2131 0.2 0.0 157208 5816 ? Ss 01:46 0:00 \_ sshd: yvan [priv]

yvan 2133 0.0 0.0 157208 2304 ? S 01:46 0:00 \_ sshd: yvan@pts/1

[root@localhost ~]# kill -sigkill 2133

[root@localhost ~]# ps auxf |grep sshd

root 1698 0.0 0.0 112812 4320 ? Ss 00:58 0:00 /usr/sbin/sshd -D

root 1699 0.0 0.0 157208 5884 ? Ss 00:58 0:00 \_ sshd: root@pts/0

root 2160 0.0 0.0 112704 964 pts/0 S+ 01:47 0:00 \_ grep --color=auto sshd

IT運維網 版權所有丨如未注明 , 均為原創丨本網站采用BY-NC-SA協議進行授權 , 轉載請注明Linux進程管理命令-kill!

總結

以上是生活随笔為你收集整理的linux进程管理命令kill,Linux进程管理命令-kill | IT运维网的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。