To monitor and control a process, you must first understand the current process, that is, you need to view the current process, and the ps command is the most basic and very powerful process view command. Use this command to determine which processes are running and running, whether the process ends, whether the process is dead, which processes are taking up too many resources, and so on. In short, most of the information can be obtained by executing this command.
ps provides us with a one-time view of the process, and the results provided by it are not dynamically continuous; if you want to monitor the process time, you should use the top tool.
kill is used to kill the process.
1, ps parameter description
ps provides a lot of option parameters, commonly used are the following:
l long format output;
u display the process in the order of user name and start time;
j Use the task format to display the process;
f Display the process in a tree format;
a Display all processes of all users (including other users);
x Display the process without a control terminal;
r shows the running process;
ww avoids the detailed parameters being truncated;
Our common choice is that the combination is aux or lax, and the application of the parameter f.
2, ps aux or lax output explanation
USER process owner;
PID process ID;
PPID parent process;
%CPU process CPU percentage;
The percentage of memory occupied by %MEM;
The NICE value of the NI process, the value is large, indicating less CPU time;
VSZ process virtual size;
the number of pages in the RSS resident;
TTY terminal ID
STAT process state (there are several)
D can not be interrupted sleep (usually IO process);
R may be in the running The queue can be passed;
S is in hibernation;
T is stopped or tracked;
W enters memory swap (invalid from kernel 2.6);
X dead process (never Seen);
Z Zombie Process;
< High Priority Process
N Lower Priority Process
L Some pages are locked into memory;
s Process leader (There are child processes under it);
l Multi-process (using CLONE_THREAD, similar to NPTL pthreads);
+ process group in the background;
WCHAN waiting process resources;
START Time to start the process;
TI ME process consumes CPU time;
COMMAND command name and parameters;
3, application examples
[root@localhost ~]# ps -aux
badblocks is the command or utility in linux like operating system which can scan or test our hard d
HAProxy provides high availability, load balancing, and proxy for TCP and HTTP applications, support
First, the installation of VirtualBox and expansion package installation steps is too simple, and wi
Linux kernel is very stable, but it is still inevitable to encounter a crash, get the memory image w
Linux dynamic library (.so) search path
Centos 6 error after closing ipv6: Module off not found Solution
How to get the information of U disk plugging and unplugging in Linux system environment
How to install software in Linux operating system
Simple file synchronization between Linux
Svn use under linux (svn command)
Linux file lookup command find, xargs details
Linux usermod command introduction
Linux system how to quickly view the process pid
Win8 system "text change error" prompts how to do
How to deal with WinXP broadband local connection is restricted or no connection?
A detailed introduction to Debian
Win 2000 Security Settings Checklist
Win8 System Power Plan What is the
New Windows 7 Features System Window Smart Arrangement
Win8.1 mail, calendar and network applications welcome major updates
IIS 301 redirects to the domain name at the beginning of www
How is the seed used? How to use the quick seeding, how to see?
The method of opening the ahci mode in the Windows 7 system under the Thinkpad series