Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
24.  Monitoring System Performance (Tasks) Monitoring System Activities (sar) How to Check System Table Status (sar -v)  Previous   Contents   Next 
   
 

Example--Checking System Table Status

The following abbreviated example shows output from the sar -v command. This example shows that all tables are large enough to have no overflows. These tables are all dynamically allocated based on the amount of physical memory.

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

00:00:00  proc-sz    ov  inod-sz    ov  file-sz    ov   lock-sz
01:00:00   43/922     0 2984/4236    0  322/322     0    0/0   
02:00:02   43/922     0 2984/4236    0  322/322     0    0/0   
03:00:00   43/922     0 2986/4236    0  323/323     0    0/0   
04:00:00   43/922     0 2987/4236    0  322/322     0    0/0   
05:00:01   43/922     0 2987/4236    0  322/322     0    0/0   
06:00:00   43/922     0 2987/4236    0  322/322     0    0/0   

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 venus 5.9 Generic sun4u    06/24/2001

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
02:00:02    0.00     0.0    0.00     0.0      22
03:00:00    0.00     0.0    0.00     0.0      22
04:00:00    0.00     0.0    0.00     0.0      22
05:00:01    0.00     0.0    0.00     0.0      22
06:00:00    0.00     0.0    0.00     0.0      22
07:00:00    0.00     0.0    0.00     0.0      22
08:00:01    0.00     0.0    0.00     0.0      22
08:20:00    0.00     0.0    0.00     0.0      22
08:40:00    0.00     0.0    0.00     0.0      22
09:00:00    0.00     0.0    0.00     0.0      22
09:20:00    0.00     0.0    0.00     0.0      22
09:40:00    0.00     0.0    0.00     0.0      22
10:00:00    0.00     0.0    0.00     0.0      22
10:20:00    0.00     0.0    0.00     0.0      22
10:40:01    0.00     0.0    0.00     0.0      23
11:00:00    0.00     0.0    0.00     0.0     144

Average     0.00     0.0    0.00     0.0      24

How to Check Terminal Activity (sar -y)

Use the sar -y command to monitor terminal device activities.

$ sar -y
00:00:00 rawch/s canch/s outch/s rcvin/s xmtin/s mdmin/s
01:00:00       0       0       0       0       0       0

If you have a lot of terminal I/O, you can use this report to determine if there are any bad lines. The activities recorded are defined in the following table.

Table 24-20 Output From the sar -y Command

Field Name

Description

rawch/s

Input characters (raw queue), per second

canch/s

Input characters that are processed by canon (canonical queue), per second

outch/s

Output characters (output queue) per second

rcvin/s

Receiver hardware interrupts per second

xmtin/s

Transmitter hardware interrupts per second

mdmin/s

Modem interrupts per second

The number of modem interrupts per second (mdmin/s) should be close to zero. The receive and transmit interrupts per second (xmtin/s and rcvin/s) should be less than or equal to the number of incoming or outgoing characters, respectively. If this is not the case, check for bad lines.

Example--Checking Terminal Activity

The following abbreviated example shows output from the sar -y command.

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

00:00:00 rawch/s canch/s outch/s rcvin/s xmtin/s mdmin/s
01:00:00       0       0       0       0       0       0
02:00:02       0       0       0       0       0       0
03:00:00       0       0       0       0       0       0
04:00:00       0       0       0       0       0       0
05:00:01       0       0       0       0       0       0
06:00:00       0       0       0       0       0       0
07:00:00       0       0       0       0       0       0
08:00:01       0       0       0       0       0       0
08:20:00       0       0       0       0       0       0
08:40:00       0       0       0       0       0       0
09:00:00       0       0       0       0       0       0
09:20:00       0       0       0       0       0       0
09:40:00       0       0       0       0       0       0
10:00:00       0       0       0       0       0       0
10:20:00       0       0       0       0       0       0
10:40:01       0       0      20       0       0       0

Average        0       0       3       0       0       0

How to Check Overall System Performance (sar -A)

Use the sar -A command to display statistics from all options to provide a view of overall system performance.

This command provides a more global perspective. If data from more than a single time segment is shown, the report includes averages.

Collecting System Activity Data Automatically (sar)

Three commands are involved in the automatic collection of system activity data: sadc, sa1, and sa2.

The sadc data collection utility periodically collects data on system activity and saves it in a file in binary format, one file for each 24-hour period. You can set up the sadc command to run periodically (usually once each hour), and whenever the system boots to multiuser mode. The data files are placed in the /var/adm/sa directory. Each file is named sadd, where dd is the current date. The format of the command is as follows:

/usr/lib/sa/sadc [t n] [ofile]

The command samples n times with an interval of t seconds (t should be greater than 5 seconds) between samples. This command then writes to the binary ofile file, or to standard output.

 
 
 
  Previous   Contents   Next