Sunday, June 10, 2012

free command explained

Memory in the system can be viewed with free command


# free -m
                    total       used       free     shared    buffers     cached
Mem:           498         85        413          0          5         32
-/+ buffers/cache:         47        451

The  -/+ buffers/cache is calculated as follows
  • used uses -
  • free uses +
  • used -/+ = used - buffers - cached = 85 - 5 - 32 = 47 (~ 48)
  • free -/+ = free + buffers + cached = 413 + 5 + 32 = 450 (~ 451)

No comments:

Post a Comment