Hangs and restores of Linux processes

Source: Internet
Author: User

Process suspend and resume
#ctrl +z: Hang, the program is put in the background, the program does not end.
#jobs: View suspended program work numbers
When the recovery process executes, there are two options: the FG command puts the suspended job back in the foreground, and the BG command puts the suspended job in the background execution
Format: FG work number; BG work number
Process: A program that is being executed
Program: A well-written code or script
&amp: Background execution, do not occupy terminal
such as: Xeyes &

PS Command Process View command
PS Command: Process status
-E Show All processes
-F Full format
-H does not display the caption
-L Long format
-W Wide output
A shows all processes on the terminal, including the processes of other users
R shows only the running processes
X shows no control of the terminal process

The most commonly used three parameters are U, a, x.
Output format for #ps Axu
User: Process Owner
PID: Process Number
%CPU: CPU Usage consumed
%MEM: Memory usage consumed
VSZ; The amount of virtual memory occupied
RSS: The amount of memory consumed
TTY: Terminal number
STAT: Change Process status
Start: Process Start time
Time: When it was executed
Command: the command executed
D: Non-disruptive hibernation (usually indicates that the process is in the I/O action)
R: Executing in progress
S: Sleep state
T: Pause execution
W: Not enough memory paging to allocate
<: high-priority processes
N: Low-priority process
L: Memory paging is allocated and locked in memory (instant system or custom I/O)

Kill: Interrupts a process (process)
When interrupting a foreground process is usually used CTRL + C; For background process with kill command
The kill command ends by sending a specified signal to the process. The default is the term signal. The term signal terminates all processes that cannot capture the signal, which is not captured for processes that can capture the signal using the kill–9 signal.
Kill terminal, can only kill the terminal shell, and exit the terminal, but the terminal does not shut down
Pkill command name can kill process directly
Pkill qmail//Kill QMail program process directly

Hangs and restores of Linux processes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.