Overview | |
Goal | To evaluate and control processes running on a Lunix system |
Objectives |
|
Sections |
|
Lab | Monitoring and Managing Linux Process |
What is process?
A process is a running instance of a launched, executable program. A process consists of:
An existing(Parent) process duplicates its own address space(fork) to create a new(child) process structure. Every new process is assigned a unique process ID(PID) for tracking and security. The PID and the Parents? Process ID(PPID) are elements of the new process enviroment. All processes are descendants of the first system process, systemd.
Name | Flag | Kernel-defined state name and description |
Running | R | TASK_RUNNING: The process is either executing on a CPU or waiting to run. Process can be executing user routines or kernel routines(system calls), or be queued and ready when in the Running(or Runnable) state. |
Sleeping | S | TASK_INTERRUPTIBLE: |
D | TASK_UNINTERRUPTIBLE | |
K | TASK_KILLABLE | |
Stopped | T | TASK_STOPPED |
T | TASK_TRACKED | |
Zombie | Z | EXIT_ZOMBIE |
X | EXIT_DEAD |
Listing processes
the ps command is used for listing current processes. The command can provide detailed process infomation, include:
Note: The linux version of ps supports three option formats, including:
for example, ps -aux not the same as ps aux
Monitoring and Managing Linux Processes
原文:http://www.cnblogs.com/elewei/p/4767696.html