View processes (ps or top) in Linux, or use graphical interfaces

Source: Internet
Author: User
In Linux, view the process (ps or top), or use the graphical-Linux general technology-Linux technology and application information. The following is a detailed description. Terminal command line:

1. ps
The ps ax command displays a list of processes in the current system, including processes owned by other users.

Ps output will be very long. To prevent it from slipping quickly from the screen, you can output it to the less command:
Ps aux | less

You can use the ps command and grep command to check whether a process is running. For example, to determine whether Emacs is running, run the following command:
Ps ax | grep emacs

2. ps aux
To display processes and their owners, run the ps aux command.

The list is a static list. In other words, it is a snapshot of the process that is running when you enable this command.

3. top
If you need a list of running processes updated at any time, use the top command described below.

The top command displays the currently running processes and important information about them, including their memory and CPU usage. This list is both real-time and interactive.
Interactive commands that can be used with top include:

Command description
[Space] refresh the display now
[H] display the help screen
[K] Kill a process. You will be prompted to enter the process ID and the signal to be sent to it.
[N] change the number of processes to be displayed. You will be prompted to enter the quantity.
U is sorted by users.
[M] sort by memory usage.
[P] sort by CPU usage.
[Q] exit top.

Tip: Apps similar to Mozilla and Nautilus are thread-aware-multiple threads are created to process multiple users or requests, and each thread has its own PID. By default, only the main (initial) threads are displayed in ps and top. To view all threads, run the ps-m command or press [Shift]-[H] on the top.

Graphical interface View

4. If you prefer a graphical interface than top, you can use GNOME system monitor. To start it from the desktop, choose Main Menu> system Tools> system monitor on the panel or enter gnome-system-monitor at the shell prompt of the X Window system. Select the Process List tab.

[ This post was last edited by Yutie]

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.