Linux in Memory view command free detailed

Source: Internet
Author: User

Add by Zhj: saying so much, actually looking at the first line is enough, the free item is unused memory. Actually, I feel like there's no need.

Using the free command, use top instead.

Original: http://liustb.blog.163.com/blog/static/1337080192011718112434416/

The free command is used to view memory usage and is less expensive than the top command.

$free –m

Total used free shared buffers Cached

MEM:1002 769 232 0 62 421

-/+ Buffers/cache 286 715

Swap 1153 0 1153

Note: When you understand the output of the free command, you distinguish between two concepts: the first line (mem), which is for the operating system, and the buffer and cache for the operating system are used memory. The second line (-/+ Buffers/cache) is for the application, and for the application,both the buffer and the cache belong to the memory that can be used.

So:

First Line ( mem):

Total: The amount of physical memory that the system can use is 1002;

Used indicates that the memory allocated is 769, including the buffer and cache memory 286 that have been actually used, unused buffer memory 62, unused cache memory 421, namely 769 = + 421 + 286;

Free: Indicates that the unallocated physical memory is 232;

Buffers: Buffer memory that has been allocated by the system but not used ;

Cached: The cache memory 421 that has been allocated but not used;

second row ( -/+ buffers/cache);

Used: buffer and cache memory that have been really used by the application are 286;

Free: the memory that can be used by the application is 715, which includes: Buffer memory 62 that has been allocated but not used, cache memory 421 allocated and unused, and memory 232 not allocated , i.e.: 715 = + 421 + 232;

another: The difference between buffer and cache in Linux:

Buffer: The data memory to write to the hard disk;

Cache: Data memory read into memory;

Linux in Memory View command free detailed (GO)

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.