Difference between revisions of "Free (command)"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Line 1: Line 1:
 
<code>free</code> <ref>http://man7.org/linux/man-pages/man1/free.1.html</ref> display amount of free and used [[memory]] in the system
 
<code>free</code> <ref>http://man7.org/linux/man-pages/man1/free.1.html</ref> display amount of free and used [[memory]] in the system
<pre>
+
 
free -h
+
free -h
 +
              total        used        free      shared  buff/cache  available
 +
Mem:          503G        21G        43G        2.1M        438G        478G
 +
Swap:          975M        50M        925M
 +
 
 +
 
 +
free
 
               total        used        free      shared  buff/cache  available
 
               total        used        free      shared  buff/cache  available
Mem:           503G        21G        43G       2.1M        438G        478G
+
Mem:     528029540    22891532    48868648       2128  456269360  501718128
Swap:         975M        50M       925M
+
Swap:        999420      51456      947964
</pre>
 
  
<pre>
+
 
free
+
free -h
 
               total        used        free      shared  buff/cache  available
 
               total        used        free      shared  buff/cache  available
Mem:     528029540    22891532    48868648       2128  456269360  501718128
+
Mem:           985M       468M        79M        65M        437M        302M
Swap:       999420      51456      947964
+
[[Swap]]:           0B          0B          0B
</pre>
+
 
  
 
== Activities ==
 
== Activities ==

Revision as of 10:24, 10 May 2020

free [1] display amount of free and used memory in the system

free -h
             total        used        free      shared  buff/cache   available
Mem:           503G         21G         43G        2.1M        438G        478G
Swap:          975M         50M        925M


free
             total        used        free      shared  buff/cache   available
Mem:      528029540    22891532    48868648        2128   456269360   501718128
Swap:        999420       51456      947964


free -h
             total        used        free      shared  buff/cache   available
Mem:           985M        468M         79M         65M        437M        302M
Swap:            0B          0B          0B


Activities

  1. Emptying the buffers cache: free -h && sync && echo 3 > /proc/sys/vm/drop_caches && free -h[2]
  2. Use fio with direct=0 to fill up your cache.

See also

  • http://man7.org/linux/man-pages/man1/free.1.html
  • https://unix.stackexchange.com/questions/87908/how-do-you-empty-the-buffers-and-cache-on-a-linux-system
  • Advertising: