June 28, 2011, 11:25 a.m.
posted by whitehat
The vmstat Command
You can also determine memory and swap usage with the vmstat command, which provides a summary of what top produces. In the example, memory is still 15% free (158,196MB used from a total of 130,780) and only 80MB of the swap partition is being used.
[[email protected] tmp]# vmstat procs ------memory----- --swap- ---io-- -system- --cpu-- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 80 158196 276272 357236 0 0 1 0 0 4 4 1 95 0 [[email protected] tmp]#
As your memory fills up, your system temporarily stores programs and data on your hard disk's swap partition. Excess swapping of programs and data between disk and memory can cause your system to slow down significantly and memory usage should be monitored to allow you to plan ways to either increase RAM or tune the way your system operates.