Linux command explanation-process view

Source: Internet
Author: User

1. View of the process:

Ps–el

--E: Show all processes, including those without control terminal

--l: Display in long format

The results show:

PID: Process Number

PPID: Parent Process

TTY: Control terminal

Stat: The current state of the process where S: Indicates sleep state, D: Non-interruptible sleep Z: Zombie status R: Running

NI: View Process priority

Time: The total duration of the launch

Ps–aux

--A: Show All Processes

--u: Show Users

--x: Show non-terminal processes

Ps–aux–sort PID

Sort by Process number

2. Kill the process:

Xclock Open Time Process

Ps–aux | grep xclock Find to process number

Kill Process Number

Kill–s Signal Process Number

Kill–l List all signals

For example: Kill–s 19 2051//19: Indicates a stop signal, can be viewed by Kill–l, 2051 represents the time process number

Killall process name kills all processes

For example:

Service httpd start//Turn on HTTP service

Ps–aux | grep httpd

Killall httpd

Xkill Graphical interface can use this command to kill graphical interface Ctrl+alt+tab exit

3. Change the priority of the process

Nice-n level Process number//Specify process

Renice n PID//running process, changing the priority of the process

4. Real-time Process view

Top: Real-time viewing process, automatically refreshed every five seconds

-D: Show the first few Eg:top–d 3//Show only the first three

-C: Displays the entire command line and not just the command name

-Q: Update the displayed information immediately

U: View Users

H? : Help

K: Kill Process

NQ: Exit

5. Process hangs

Xclock &//Indicates that the Xclock process is being run in the background

CTRL +Z//Background run hangs

Ctr +c

Jobs: View all the processes in the background

FG N: Get the background process to the foreground n indicates the job number

BG N: Put in the background

Linux command explanation-process view

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.