System Administration Guide: Advanced Administration

How to Check Unused Memory (sar -r)

Use the sar -r command to report the number of memory pages and swap-file disk blocks that are currently unused.


$ sar -r
00:00:00 freemem freeswap
01:00:00    2135   401922

The following table describes the output from the -r option.

Table 24–16 Output From the sar -r Command

Field Name 

Description 

freemem

The average number of memory pages that are available to user processes over the intervals sampled by the command. Page size is machine-dependent. 

freeswap

The number of 512-byte disk blocks that are available for page swapping. 

Example—Checking Unused Memory

The following example shows output from the sar -r command.


$ sar -r
SunOS venus 5.9 Generic sun4u    06/24/2001

00:00:00 freemem freeswap
01:00:00    2135   401922
02:00:02    2137   401949
03:00:00    2137   402006
04:00:00    2139   401923
05:00:01    2138   402033
06:00:00    2137   401919

Average     2500   399914