Linux Process management command

Process management command

init: Process number is 1

Classification of processes:
     the processes associated with the terminal
     Terminal independent process

1.process state:

     D: Non interrupted sleep
     R: Run or ready
     S: Interrupted sleep
     T: Stop it
     Z:  Zombie state

     <:  High priority process
     N: Low priority process
     +: Processes in the foreground process group
     l:  Multi thread processes
     s:  The first process of the session

2.process command

ps -aux
    ps: Process State

    a:All the processes associated with the terminal
    u:the processes created by the current user
    x:All the processes that are not related to the terminal

ps -o property1,property2
   eg. ps -o pid,comm,ni

pstree: Display process tree

pidof: Find the ID number according to the process name
    M: Sort the dwell memory size
    P:Sort by using the percentage of CPU
    T: Sort by the total time

    l: Whether the average load and start time are displayed
    t: Whether the display process and CPU status information
    m:Display memory related information

    c: Display complete command line information
    q: exit top
    k: To terminate a process
    -d: Long latency , unit is second
    -b: Batch mode
    -n #:In batch mode,Show how many batches

Important signal:
1:SIGHUP: Let a process not restart,You can read the configuration file,And let the new configuration information come into effect
2:SIGINT: Ctrl+c: Interrupt a processes
9:SIGKILL:Kill a processes
15:SIGTERM:Terminate a process(Default signal)

kill PID

killall COMMAND

send a signal:
    by Signal number:kill -1
    by signal name:kill -SIGKILL
    by Signal for short:kill -KILL

      Ctrl+z: Send the job to the background in the foreground.
      COMMAND &:Let the command execute in the background.

bg:Let the background of the job to continue to run
    bg [%JOBID]

jobs: See all of the work in the background.
       job ID,not is pid
fg: The background work to the Foreground
    fg [%JOBID]

kill %JOBID: Terminate a job

vmstat:System status view command
uptime: View system load

Pingbacks are closed.

Comments are closed.