System Administration Guide: Advanced Administration

ProcedureHow to Check Page-Out and Memory (sar -g)

  1. 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 might 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 the pgfree/s and pgscan/s fields, indicates a memory shortage.

    The sar -g command also shows whether inodes are being recycled too quickly and causing a loss of reusable pages.


Example 13–8 Checking Page-Out and Memory (sar -g)

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


$ sar -g

SunOS balmyday 5.10 s10_51 sun4u    03/18/2004

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:00     0.01     0.01     0.01     0.00     0.00
03:00:00     0.00     0.00     0.00     0.00     0.00
04:00:00     0.00     0.00     0.00     0.00     0.00
05:00:00     0.00     0.00     0.00     0.00     0.00
06:00:00     0.00     0.00     0.00     0.00     0.00
07:00:00     0.00     0.00     0.00     0.00     0.00
08:00:00     0.00     0.00     0.00     0.00     0.00
08:20:01     0.00     0.00     0.00     0.00     0.00
08:40:00     0.00     0.00     0.00     0.00     0.00
09:00:00     0.00     0.00     0.00     0.00     0.00
09:20:01     0.05     0.52     1.62    10.16     0.00
09:40:01     0.03     0.44     1.47     4.77     0.00
10:00:02     0.13     2.00     4.38    12.28     0.00
10:20:03     0.37     4.68    12.26    33.80     0.00

Average      0.02     0.25     0.64     1.97     0.00

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

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 that the number of ufs inodes might need to be increased.