Linux Process Management Study Notes

Linux Process Management

basic understanding

Refers to the process of the program (the code) running under Linux, can be run in the foreground or the background.

Commonly used commands

  1. ps option parameter: view the current process in which activities may not add parameters
    commonly used option argument:
    -a: shows all the process information
    -u: user-friendly format to display information about processes
    -x: display processes running in the background information
    generally three parameters are selected, i.e. using ps -aux ways to get information about the processes
    Here Insert Picture Description
    can also be used to show all ps -ef instruction format whole process, can be found corresponding to the parent of the process
    Here Insert Picture Description
    can also be viewed by the pipe symbol We need content.

  2. Termination instruction process:

    1. Options kill the process id number (-9 indicates a mandatory general election option to kill the process, you can not choose)
      Example: Telnet user driven back
      Here Insert Picture Description
      after this operation, the push back of the user's connection:
      Here Insert Picture Description

    2. killall Process name: You can terminate multiple sub-processes belonging to the process

  3. Dynamic monitoring of ongoing processes: top option argument

    1. Commonly used parameters:
      -d: Specifies the updated once every few seconds (instruction: top -d number of seconds)
      -i: zombie processes will not be displayed (instruction: Top -i)
      -p: id number represents a monitoring process ( instruction: top -p id number)
    2. Interactive Instruction: After typing top instruction, interactive instruction can operate at the interface of the monitoring process.
      Commonly used interactive command:
      k: pledged to terminate certain processes, you can terminate the instruction input id carriage return after the corresponding process.
      u: pledged to view the process information belonging to a user, type the user name corresponding to the input carriage return after u
      q: q Enter after typing, you can exit the top of the monitor interface
      P: After pressing Enter, according to the process Sort cpu occupancy rate
      M: after pressing Enter, memory usage may sort process
      N: after pressing Enter, ordering process can id number
Released nine original articles · won praise 0 · Views 1000

Guess you like

Origin blog.csdn.net/qq_43156103/article/details/88425955