Use
View system memory (physical/virtual/cache/shared) usage
Usage
free [-b | -k | -m | -g | -h] [-o] [-s delay ] [-c count ] [-a] [-t] [-l] [-V]
Common options
Options |
meaning |
Description |
-B |
Unit byte |
Switch displays the amount of memory in bytes; |
-K |
Unit K |
Switch (set by default) displays it in kilobytes; |
-M |
Unit m |
Switch displays it in megabytes; |
-G |
Unit g |
Switch displays it in gigabytes; |
-H |
Human readable mode |
Switch displays all output fields automatically scaled to the shortest (three digit) representation including the unit. That makes the values human readable. |
-T |
Show Total row of sinks |
Switch displays a line containing the totals. |
-O |
Disables the display of a "buffer adjusted" line |
Switch disables the display of a "buffer adjusted" line. If the-o option isn't specified, free subtracts buffer memory from the used memory and adds it to the free memory report Ed. |
-S interval of seconds |
Repeat refresh display at intervals of several seconds |
Switch activates continuous polling delay seconds apart. Actually specify any floating point number for delay, Usleep (3) are used for microsecond resolution delay times. |
-C Times |
Total number of repeated refreshes displayed |
Switch used together with THE-S switch interrupts the polling after count repetitions. |
-L |
Show Low Line |
Switch shows detailed low and high memory statistics. |
-A |
Show available memory |
Switch shows the available memory (if supported by the running kernel and enabled with Sysctl-w Vm.mem-info_legacy_layout =0; Shows zero when unsupported or disabled). The produced output is wider than characters. |
-V |
Display Program Version information |
Switch displays version information. |
Practice
1 Displaying memory usage
[[email protected] ~]# free -h total used free shared buffers cachedMem: 2.9G 2.7G 209M 37M 11M 185M-/+ buffers/cache: 2.5G 405MSwap: 1.6G 1.2G 415M
Resources
"1" Mans free
"2" one Linux command per day: free command
Http://www.cnblogs.com/peida/archive/2012/12/25/2831814.html
The free command on "3" Linux is detailed
Http://www.cnblogs.com/coldplayerest/archive/2010/02/20/1669949.html
N days to learn the free of a Linux command