[kanchilug] 1D1C - free

  • From: Dhana Sekar <tkdhanasekar@xxxxxxxxx>
  • To: ILUG-C <ilugc@xxxxxxxxxxxxx>, kanchilug@xxxxxxxxxxxxx
  • Date: Thu, 20 Jun 2013 19:24:01 +0530

command: free
purpose: Display amount of free and used memory in the system
              displays the total amount of free and used physical and swap
              memory in the system, as well as the buffers used by the
kernel

Syntax:  free [-b|-k|-m|-g] [-c count] [-l] [-o] [-t] [-s delay] [-V]

options:

Options:
       -b    Display the amount of memory in bytes.

       -c count
              Display the result count times.  Requires the -s option.

       -g    Display the amount of memory in gigabytes.

       -k    Display the amount of memory in kilobytes. This is the default.

       -l     Show detailed low and high memory statistics.

       -m   Display the amount of memory in megabytes.

       -o    Display the output in old format, the only difference being
this
              option will disable the display of the "buffer adjusted" line.

       -s    Continuously display the result delay seconds apart.

       -t     Display a line showing the column totals.

       -V    Display version information.

example:

1. by default free command shows the free and used space of physical and
swap
    memory in kb
    #free
2. switch the free output in bytes/kb/mb/gb
    #free -b
    #free -k
    #free -m
    #free -g
3. To display the totals line at the end, execute free command with -t
option
    #free -t
4. Free command displays the output with buffer line normally. we can
disable
    that line in the display by using -o option
    #free -o
5. With -s optoin, we can activate the display of free to show it in every
    regular intervals for 5 seconds
    #free -s 5

regards,
dhanasekar

Other related posts: