Linux Learning Note--top Command (command to monitor the status of Linux systems)

Source: Internet
Author: User

The top command is a common performance analysis tool under Linux that shows the resource usage of each process in real time, such as CPU, memory usage, and so on, similar to the Task Manager of Windows.

1. Command format:

top[选项]

2. Common options:

"top -c"         显示完整的命令行而不只是显示命令名。"top -d"         指定每两次屏幕信息刷新之间的时间间隔。"top -n 3"       指定循环的次数为3次。"top -u 用户名"  指定用户名。"top -p 进程号"  指定进程号。

3. Display Information Analysis:

1) The first line of information content analysis

content Description
11:37:29 Current system time
Up 149 days, 23:47 The system has been running continuously for 149 days, 23 hours, 47 minutes.
1 user There are currently 1 users logged into the system
Load average:0.00, 0.00, 0.00 The three numbers behind the load average are 1-minute, 5-minute, and 15-minute loads, respectively.


2) Second line of information content analysis

content Description
tasks:193 Total Total number of processes
1 Running Number of processes that are running
192 Sleeping Number of processes for sleep
0 stopped Number of processes stopped
0 Zombie Number of zombie processes


3) Third line of information content analysis

content Description
Cpu (s): 0.1%us Percentage of CPU occupied by user space
0.1%sy Percentage of CPU consumed by kernel space
0.0%ni CPU percentage of processes that have changed priority in user process space
99.8%id Percentage of idle CPU
0.0%wa Percentage of CPU time waiting for input and output
0.0%hi The total amount of time the CPU spends on hardware terminals
0.0%si The total amount of time the CPU spends on software terminals
0.0%st Steal time


4) The fourth line of information content analysis

content Description
mem:8062100k Total Total Physical Memory
4158524k used Total amount of physical memory used
3903576k Free Total Free Memory
339492k buffers Amount of memory to use as the kernel cache


5) The fifth line of information content analysis

content Description
swap:8191992k Total Total Swap Area
0k used Total number of swap areas used
8191992k Free Total Free Swap Area
1964908k Cached Total Buffer Swap Area


6) Analysis of the information content of the six lines

content Description
Pid Process ID
USER User name of the process owner
PR Priority level
NI A nice value negative indicates a high priority, positive values indicate low priority
VIRT Total amount of virtual memory used by the process, Unit kb,virt=swap+res
Res The amount of physical memory not swapped out by the process, Unit Kb,res=code+data
Shr Shared memory size, in kilobytes
S Process Status: d= non-disruptive sleep state, r= run, s= sleep, t= track/Stop, z= zombie process
%cpu CPU time consumption percentage last updated to current
%MEM Percentage of physical memory used by the process
time+ Total CPU time used by the process, Unit 1/100 sec
COMMAND Command name/command line

Linux Learning Note--top Command (command to monitor the status of Linux systems)

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.