System Administration Guide: Advanced Administration

How to Check System Call Statistics (sar -c)

Display system call statistics by using the sar -c command.


$ sar -c
00:00:00 scall/s sread/s swrit/s  fork/s  exec/s rchar/s wchar/s
01:00:00      38       2       2    0.00    0.00     149     120

The following table describes the system call categories that are reported by the -c option. Typically, reads and writes account for about half of the total system calls, although the percentage varies greatly with the activities that are being performed by the system.

Table 24–9 Output From the sar -c Command

Field Name 

Description 

scall/s

All types of system calls per second (generally about 30 per second on a system with 4 to 6 users). 

sread/s

read system calls per second.

swrit/s

write system calls per second.

fork/s

fork system calls per second (about 0.5 per second on a system with 4 to 6 users). This number will increase if shell scripts are running.

exec/s

exec system calls per second. If exec/s divided by fork/s is greater than three, look for inefficient PATH variables.

rchar/s

Characters (bytes) transferred by read system calls per second.

wchar/s

Characters (bytes) transferred by write system calls per second.

Example—Checking System Call Statistics

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


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

00:00:00 scall/s sread/s swrit/s  fork/s  exec/s rchar/s wchar/s
01:00:00      38       2       2    0.00    0.00     149     120
02:00:02      38       2       2    0.00    0.00     149     120
03:00:00      42       2       2    0.05    0.05     218     147
04:00:00      39       2       2    0.01    0.00     155     123
05:00:01      38       2       2    0.00    0.00     150     120
06:00:00      38       2       2    0.01    0.00     149     120

Average       50       4       3    0.02    0.02     532     238