linux kill -9 的记录,批量杀进程

日常工作中常用 kill pid 或者 kill -9 pid 来杀进程。

批量杀进程

# ps -fu oraprod |awk '{print $2}'|xargs  kill -9
# ps -fu applprod|awk '{print $2}'|xargs  kill -9  
# ps -fu applprod|grep -i "fnd"|awk '{print $2}'|xargs  kill -9 

$ ps -fu oraprod |awk '{print $2}'|xargs  kill -9
$ ps -ef|grep $ORACLE_SID| grep LOCAL=NO | grep -v grep |awk '{print$2}'|xargs -i kill -9 {}

下面是 kill -l 时的输出
linux signals

Signal Name Number  Description
SIGHUP  1   Hangup (POSIX)
SIGINT  2   Terminal interrupt (ANSI)
SIGQUIT 3   Terminal quit (POSIX)
SIGILL  4   Illegal instruction (ANSI)
SIGTRAP 5   Trace trap (POSIX)
SIGIOT  6   IOT Trap (4.2 BSD)
SIGBUS  7   BUS error (4.2 BSD)
SIGFPE  8   Floating point exception (ANSI)
SIGKILL 9   Kill(can't be caught or ignored) (POSIX)
SIGUSR1 10  User defined signal 1 (POSIX)
SIGSEGV 11  Invalid memory segment access (ANSI)
SIGUSR2 12  User defined signal 2 (POSIX)
SIGPIPE 13  Write on a pipe with no reader, Broken pipe (POSIX)
SIGALRM 14  Alarm clock (POSIX)
SIGTERM 15  Termination (ANSI)
SIGSTKFLT   16  Stack fault
SIGCHLD 17  Child process has stopped or exited, changed (POSIX)
SIGCONT 18  Continue executing, if stopped (POSIX)
SIGSTOP 19  Stop executing(can't be caught or ignored) (POSIX)
SIGTSTP 20  Terminal stop signal (POSIX)
SIGTTIN 21  Background process trying to read, from TTY (POSIX)
SIGTTOU 22  Background process trying to write, to TTY (POSIX)
SIGURG  23  Urgent condition on socket (4.2 BSD)
SIGXCPU 24  CPU limit exceeded (4.2 BSD)
SIGXFSZ 25  File size limit exceeded (4.2 BSD)
SIGVTALRM   26  Virtual alarm clock (4.2 BSD)
SIGPROF 27  Profiling alarm clock (4.2 BSD)
SIGWINCH    28  Window size change (4.3 BSD, Sun)
SIGIO   29  I/O now possible (4.2 BSD)
SIGPWR  30  Power failure restart (System V)

转载于:https://www.cnblogs.com/ctypyb2002/p/9793109.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值