View system processes in Centos

Source: Internet
Author: User
The psax command displays a list of processes in the current system, which includes processes owned by the user. To display processes and their owners, run the psaux 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. If you need a list of running processes Updated at any time, use the top command described below. Ps output will be very long. To prevent it from slipping quickly from the screen, you can output it to the less command: psaux | less your ps ax command to display a list of current system processes, this list contains user-owned processes. 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. If you need a list of running processes Updated at any time, use the top command described below.
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
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. The following provides a top output example:
19:11:04 up, 9 users, load average: 0.00, 0.05, 0.12
89 processes: 88 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
Total 6.6% 0.0% 0.0% 0.0% 0.0% 0.0% 192.8%
Cpu00 6.7% 0.0% 0.1% 0.1% 0.0% 0.0%
Cpu01 0.0% 0.0% 0.0% 0.0% 0.0% 0.0%
Mem: 1028556 k av, 241972 k used, 786584 k free, 0 k shrd, 37712 k buff
162316 k active, 18076 k inactive
Swap: 1020116 k av, 0 k used, 1020116 k free 99340 k cached

Pid user pri ni size rss share stat % CPU % MEM TIME CPU COMMAND
1899 root 15 0 17728 12 M 4172 S 6.5 1.2 1120 0 X
6380 root 15 0 1144 1144 R 884 0.3 0: 00 0 top
1 root 15 0 488 488 S 432 0.0 1 init
2 root RT 0 0 0 SW 0.0 0.0 0: 00 0 migration/0
3 root RT 0 0 0 SW 0.0 0.0 0: 00 1 migration/1
4 root 15 0 0 0 SW 0.0 0.0 0: 00 0 keventd
5 root 34 19 0 0 0 SWN 0.0 0: 00 0 ksoftirqd/0
6 root 34 19 0 0 0 SWN 0.0 0: 00 1 ksoftirqd/1
9 root 25 0 0 0 SW 0.0 0.0 0: 00 0 bdflush
7 root 15 0 0 0 SW 0.0 0.0 1 kswapd
8 root 15 0 0 0 SW 0.0 0.0 1 kscand
10 root 15 0 0 0 SW 0.0 0.0 1 kupdated
11 root 25 0 0 0 SW 0.0 0.0 0: 00 0 mdrecoveryd
To exit top, press the [q] key.
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 user.
[M] sort by memory usage.
[P] sort by CPU usage.
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.