Linux process management, task management

Source: Internet
Author: User

View process

Processes in Linux can be viewed using the PS, pstree commands.

PS aux is generally used (note that there is no dash-; Although the addition does not affect execution, but will prompt), you can also use Ps-le, is to see all processes, the difference is to display the different information, master one can.

The monitoring process uses the top command, which is refreshed every 3 seconds by default.

Close process

The shutdown process can use the Kill, Pkill, killall commands.

Work management (background management)

Jobs command to view tasks performed in the background

command to follow the &, can be run in the background;

After the command executes, CTRL + Z will also be placed in the background, but will pause execution!!!

--however, any command that needs to interact with the user will be paused in the background. such as top, vi and so on.

Put to front desk: FG% Work number
Put in the background: BG% work number

However, the background process is limited to the current terminal, once the terminal is turned off, the background process will be turned off!!!

The reason is that the default kill sends Sighub to all terminals.

There are three solutions, the simplest is to use nohup boot, for example: Nohup command ...

Linux process management, task management

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.