System Administration Guide: Advanced Administration

ProcedureHow to Check Swapping Activity (sar -w)

  1. Use the sar -w command to report swapping and switching activity.


    $ sar -w
    00:00:00 swpin/s bswin/s swpot/s bswot/s pswch/s
    01:00:00    0.00     0.0    0.00     0.0      22

    The following list describes target values and observations related to the sar -w command output.

    swpin/s

    The number of LWP transfers into memory per second.

    bswin/s

    The number of blocks transferred for swap-ins per second. /* (float)PGTOBLK(xx->cvmi.pgswapin) / sec_diff */

    swpot/s

    The average number of processes that are swapped out of memory per second. If the number is greater than 1, you might need to increase memory.

    bswot/s

    The number of blocks that are transferred for swap-outs per second.

    pswch/s

    The number of kernel thread switches, per second.


    Note –

    All process swap-ins include process initialization.



Example 13–16 Checking Swap Activity (sar -w)

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


$ sar -w

SunOS balmyday 5.10 s10_51 sun4u    03/18/2004

00:00:04 swpin/s bswin/s swpot/s bswot/s pswch/s
01:00:00    0.00     0.0    0.00     0.0     132
02:00:01    0.00     0.0    0.00     0.0     133
03:00:00    0.00     0.0    0.00     0.0     133
04:00:00    0.00     0.0    0.00     0.0     134
05:00:00    0.00     0.0    0.00     0.0     133
06:00:00    0.00     0.0    0.00     0.0     133
07:00:00    0.00     0.0    0.00     0.0     132
08:00:00    0.00     0.0    0.00     0.0     131
08:20:00    0.00     0.0    0.00     0.0     133
08:40:01    0.00     0.0    0.00     0.0     132
09:00:00    0.00     0.0    0.00     0.0     132
09:20:00    0.00     0.0    0.00     0.0     132
09:40:00    0.00     0.0    0.00     0.0     335
10:00:00    0.00     0.0    0.00     0.0     601
10:20:00    0.00     0.0    0.00     0.0     353
10:40:00    0.00     0.0    0.00     0.0     747
11:00:00    0.00     0.0    0.00     0.0     804

Average     0.00     0.0    0.00     0.0     198