System Administration Guide: Advanced Administration

How to Check Swapping Activity (sar -w)

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 table describes target values and observations.

Table 24–19 Output From the sar -w Command

Field Name 

Description 

swpin/s

The number of LWP transfers into memory per second. 

bswin/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. 

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—Checking Swap Activity

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


$ sar -w
SunOS touchstone 5.9 Generic sun4u    03/04/2003

00:00:00 swpin/s bswin/s swpot/s bswot/s pswch/s
01:00:00    0.00     0.0    0.00     0.0      63
02:00:00    0.00     0.0    0.00     0.0      60
03:00:00    0.00     0.0    0.00     0.0      62
04:00:00    0.00     0.0    0.00     0.0      63
05:00:00    0.00     0.0    0.00     0.0      63
06:00:00    0.00     0.0    0.00     0.0      61
07:00:00    0.00     0.0    0.00     0.0      60
08:00:00    0.00     0.0    0.00     0.0      61
08:20:01    0.00     0.0    0.00     0.0      63
08:40:00    0.00     0.0    0.00     0.0      63
09:00:00    0.00     0.0    0.00     0.0      63
09:20:01    0.00     0.0    0.00     0.0     132
09:40:01    0.00     0.0    0.00     0.0     187
10:00:02    0.00     0.0    0.00     0.0     185
10:20:03    0.00     0.0    0.00     0.0     258
10:40:01    0.00     0.0    0.00     0.0     161
11:00:01    0.00     0.0    0.00     0.0     128
11:20:01    0.00     0.0    0.00     0.0     117
11:40:00    0.00     0.0    0.00     0.0     171
12:00:01    0.00     0.0    0.00     0.0      94
12:20:01    0.00     0.0    0.00     0.0      95
12:40:01    0.00     0.0    0.00     0.0      95
13:00:01    0.00     0.0    0.00     0.0      95
13:20:01    0.00     0.0    0.00     0.0      96
13:40:01    0.00     0.0    0.00     0.0      98
14:00:01    0.00     0.0    0.00     0.0      96
14:20:00    0.00     0.0    0.00     0.0      91
14:40:01    0.00     0.0    0.00     0.0      92
15:00:01    0.00     0.0    0.00     0.0     103

Average     0.00     0.0    0.00     0.0      88