Use the sar -g command to display page-out and memory freeing activities (in averages).
$ sar -g 00:00:00 pgout/s ppgout/s pgfree/s pgscan/s %ufs_ipf 01:00:00 0.00 0.00 0.00 0.00 0.00 |
The output displayed by the sar -g command is a good indicator of whether more memory may be needed. Use the ps -elf command to show the number of cycles that are used by the page daemon. A high number of cycles, combined with high values for pgfree/s and pgscan/s, indicates a memory shortage.
The sar -g command also shows whether inodes are being recycled too quickly and causing a loss of reusable pages.
The following table describes the output from the -g option.
Table 24–11 Output From the sar -g Command
Field Name |
Description |
---|---|
pgout/s |
The number of page-out requests per second. |
ppgout/s |
The actual number of pages that are paged-out, per second. A single page-out request might involve paging-out multiple pages. |
pgfree/s |
The number of pages, per second, that are placed on the free list. |
pgscan/s |
The number of pages, per second, that are scanned by the page daemon. If this value is high, the page daemon is spending a lot of time checking for free memory. This situation implies that more memory might be needed. |
%ufs_ipf |
The percentage of ufs inodes taken off the free list by iget that had reusable pages associated with them. These pages are flushed and cannot be reclaimed by processes. Thus, this field represents the percentage of igets with page flushes. A high value indicates that the free list of inodes is page-bound, and the number of ufs inodes might need to be increased. |
The following abbreviated example shows output from the sar -g command.
$ sar -g SunOS venus 5.9 Generic sun4u 06/24/2001 00:00:00 pgout/s ppgout/s pgfree/s pgscan/s %ufs_ipf 01:00:00 0.00 0.00 0.00 0.00 0.00 02:00:02 0.00 0.00 0.00 0.00 0.00 03:00:00 0.00 0.01 0.01 0.00 0.00 04:00:00 0.00 0.00 0.00 0.00 0.00 05:00:01 0.00 0.00 0.00 0.00 0.00 06:00:00 0.00 0.00 0.00 0.00 0.00 Average 0.01 0.12 0.21 0.66 0.00 |