Log in Go to the main page Page Discussion History Go to the file list Go to the site toolbox Bookmark and Share

Free command

From RZWiki

Image:linux-logo-large.png

A CLI command line program available on most Linux platforms; used to display physical and swap memory information and usage statistics.

Contents

Image:Vm-power-on-medium.png Usage Syntax

free [options]

Common options include;

  • -b - display information in Bytes
  • -k - display information in kiloBytes
  • -m - display information in MegaBytes
  • -g - display information in GigaBytes
  • -l - display information about low and high memory usage
  • -c number - display information the specified number of times and then exit, must be used with the -s option
  • -s number - repeat, pausing the specified number of seconds, continues indefinately unless the -c option has been used

Image:Vm-power-on-medium.png Usage Examples

free - display summary physical and swap memory usage information

free -mc 2 -s 2 - display summary physical and swap memory usage information, in megabytes, three times with a two second interval

Image:accessories-text-editor-v2-medium.png Usage Notes

The information displayed is actually stored in file: /proc/meminfo

Take a look at our Improve Ubuntu Linux Performance article for information on how to increase available memory and reduce or eliminate the use of slow swap memory.

Image:accessories-text-editor-v2-medium.png Linux Usage Notes

With most Linux or Unix commands;

  • Non root users may need to prefix commands with the sudo command, for example: sudo chmod 644 *
  • Brief help can be displayed using the -h or --help parameter, for example: chmod --help
  • A full command manual can be displayed using the man command followed by the command name, for example: man chmod
  • Sometimes 'info' pages are used instead of or to provide more information than man pages; for example: info chmod
  • Version information can normally be display using the -v, -V or --version parameter, for example: chmod --version. However, this paramater is also frequently used to display verbose output.

noinclude/noinclude

Image:utilities-terminal-medium-v2.png Typical Output

noinclude/noinclude

             total       used       free     shared    buffers     cached
Mem:           371        361         10          0        103         82
-/+ buffers/cache:        175        196
Swap:         3014         78       2935

Image:Folder-medium.png Related Files

The free executable is normally found here: /usr/bin/free

Image:object-flip-horizontal-medium.png Command Equivalents

The Cisco command equivalent is the show memory command Image:Cisco-logo-small.png

The F5 BigIP command equivalent is the bigpipe memory command Image:F5-logo-small.png

Image:icemon-medium.png Related Articles

Information on other Linux commands Image:linux-logo-small.png

Information on F5 BigIP commands Image:F5-logo-small.png

Information on Cisco commands Image:Cisco-logo-small.png

Information on Windows commands Image:Preferences-system-windows-small.png

Information on Vyatta commands Image:Vyatta-logo-small.png

Information on Extreme commands Image:Extreme-logo-small.png

Information on Nortel commands Image:Nortel-logo-small.png

Information on Zebra commands

Information on Secure Platform commands

Information on Blue Coat SGOS commands

Information on Nokia IPSO commands


Image:internet-group-chat-small.png We really do appreciate all feedback so please do send your comments, suggestions or corrections to sjiveson#routerzone.eu
(replacing the # with an @)


Site Toolbox:

Personal tools
This page was last modified on 26 May 2010, at 16:43. - This page has been accessed 21 times. - Disclaimers - About RZWiki
Powered by MediaWiki