Liunx basic commands (process learning)

Source: Internet
Author: User

Hello everyone, this time we will introduce the process management under liunx. Well, how can we describe the process? In fact, the process is an opened program. For example, if you start a program in windows, there will be a process, as in linux, but in liunxi, one program can have multiple processes. Let's take a look.

Process

Top

Pid user pr ni virt pes shr s % CPU % mem time + COMMAND

PID value user priority level virtual memory size actual memory size shared memory size status percentage of CPU percentage of memory cumulative CPU time command

<> Page flip

The largest parent process is init.

Top Dynamic Processes

Sort by M by memory size

Kill processes by k. r. Adjust the priority of processes. If it is white, set the CPU usage to change the PID )]

N Adjustment classes

Q released? Help

Ps-ef view detailed processes

Ps auxf view detailed process and command

S stands for sleep T stands for stopping R stands for running process N Low priority

NIU slow kth value) the maximum value is-20, and the minimum value is 19.

Kill-l view all the Q commands. The Q commands are passed between processes)

Kill 5695 let him commit suicide. The default process is process 15)

Kill-9 5695 forcibly Kill this process. This method is not easy to generate zombie processes and nobody cares)

Kill-19 5695 temporarily unable to operate this process)

Kill-18 5695 restore this process

Killall httpd process name) to kill all httpd Processes

Skill the process of killing the user

Skill-9 pts/2 kill users on pts/2

Pkill-u users can kill users more accurately

Pstree display tree commands

[Root @ 0425 ~] # Nice-n-20 what is the UID of the httpd manual startup process?


[Root @ 0425 ~] # Renice-2 4224 change the running process-2 the priority to be changed)

4224 UID of the process itself)

Foreground of the process:

The command for the current operation in shell is the foreground.

[Root @ 0425 ~] # Vi & Drop vi to the background

[1] 657


Jobs viewing background


[Root @ 0425 ~] # Jobs View

[1] + Stopped vi

Tasks and processes are two different things.

A task may consist of multiple processes.

Kill % 1 Kill the first task

Fg & 1 get the first background task to the foreground for processing

Ctrl + z: the task or process is paused and automatically thrown into the background.

Ps aux | grep httpd: view the personal information of the httpd process.

Bg & 1 executes the first background task in the background

[Root @ 0425 ~] # Nohup updatedb process) & parameter) Launch console process continues execution



This article is from the "history_xcy" blog, please be sure to keep this http://historys.blog.51cto.com/7903899/1296620

Related Article

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.