Basic usage of free memory space in Linux

Source: Internet
Author: User

The free command displays system usage and idle memory conditions, including physical memory, interactive area memory (swap), and kernel buffer memory

Parameters

-B Display memory in bytes
-K display memory in kilobytes
-m display memory in units of M.
-O Ignore Buffer throttling columns
-T sum information
-s< time > Execute command every specified time in s
-h displays capacity in readable form and requires free-v display version greater than 3.3
-V Version Information

Example

Example 1

[Email Protected]:/home/tnak # free-s 3 #每3秒执行一次

[Email Protected]:/home/tnak # free-m #以M为单位

[Email protected]:/home/tnak<u><font color= "#0066cc" > </font></u># free-k #以K为单位

Example 2free-h #以可读形式显示容量, requires procps-ng version greater than 3.3

$ free-h

PS: Return information description
Mem: Indicates physical memory statistics
-/+ buffers/cached: Cache statistics representing physical memory
Swap: Indicates the usage of the swap partition on the hard disk,
Line 1th Mem:
Total: Indicates the amount of physical memory.
Used: Represents the amount that the total is allocated to the cache (including buffers and cache), but may not be actually used in some of the caches.
Free: Memory that has not been allocated.
GKFX: Shared memory, general system will not be used, nor discussed here.
Buffers: The number of buffers that are allocated but not used by the system.
Cached: The number of caches that the system allocates but has not been used.
Total = used + Free
Line 2nd-/+ buffers/cached:
Used: The used-buffers-cached in the first row is also the amount of memory actually used.
Free: The sum of unused buffers and cached and unallocated memory, which is the actual memory =free+buffers+cached currently available on the system.
Because buffers and cached are the amount of memory the system needs to improve the performance request, it is actually possible to use the memory when the application requires this functionality, so it is also available to the application.
The third line is for the interchange control, which shows the usage (used) and how many free swap areas are available.

Basic usage of free memory space in Linux

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.