Linux uses top and free commands to view CPU and memory usage

Source: Internet
Author: User

Top command:

Display Content Explanation:

The first row top is: Current time, system operation days, the number of users, the average of the system load, the following three values are 1 minutes ago, 5 minutes ago, 15 minutes ago the average of the process, this value exceeds the number of CPUs, indicating that the load is too high

The second line of tasks is: Total number of processes, number of running processes, number of sleep processes, number of processes stopped, number of processes restored

The third line of CPU (s) is: CPU utilization;

The four-line mem are: Total memory, used memory, free memory, buffer in-use memory

Line five (Swap): Similar to line fourth, but reflects the use of the Swap partition (swap). Swap partition (Swap) is used frequently, and can be seen as a result of insufficient physical memory

The middle is the internal command prompt line:

H-Show help

L-Turn off or turn on the representation of the first line top information in the first section

T-turn off or turn on the second line of the first section Cpus information representation of the Tasks and the third row

M-Turn off or turn on the first part of the four-line Mem and fifth line Swap information representation

N-the list of processes in the order of the PID size (the third part is described later)

P-List of processes in the Order of CPU Utilization (third part)

M-Arrange the list of processes in the Order of Memory occupancy (Part III)

S-Content Update frequency

N-Set the number of processes displayed in the process list

Q-Exit Top

  

Use pmap-d + process number; View Process memory usage

or Ps-e-o ' pid,comm,args,pcpu,rsz,vsz,stime,user,uid '

Free command: Ready to be perfected

Linux uses top and free commands to view CPU and memory 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.