SAGARFIVE

Linux – processes kill

To kill a process use command, extend with different signal numbers, command : kill -SIGNAL PID

Process signal names and numbers: process kill methods mentioned below,to see all signals run : kill -l

Signal Names mostly used Signal Number Signal Use
SIGNULL 0 NULL, check access to PID
SIGHUP 1 Hangup
SIGINT 2 Interrupt
SIGQUIT 3 Quit
SIGKILL 9 Kill
SIGTERM 15 Terminate
SIGSTOP 24 Stop
SIGTSTP 25 Stop/pause the process
SIGCONT 26 Continue a stopped process

 

1 kill -SIGNAL PID   Kill -9 1002 Command to kill process
2 kill -SIGNAL PID PID Kill -9 1002 1003 Command to kill multi process

 

Regular/Real time we mostly check real time activities and memory usage using top command,

top – 03:43:03 up 1 day,  2:00,  3 users,  load average: 0.00, 0.00, 0.00

Tasks:  94 total,   1 running,  56 sleeping,   0 stopped,   0 zombie

%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.3 st

KiB Mem :  1005836 total,   701520 free,    94628 used,   209688 buff/cache

KiB Swap:        0 total,        0 free,        0 used.   767308 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND      .  

    1 root      20   0  123484   5392   3852 S  0.0  0.5   0:03.75 systemd

    2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd

    4 root       0 -20       0      0      0 I  0.0  0.0   0:00.00 kworker/0:0H

    5 root      20   0       0      0      0 I  0.0  0.0   0:00.39 kworker/u30:0