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, which is 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, which is 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 example shows output from the sar -c command.


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

00:00:00 scall/s sread/s swrit/s  fork/s  exec/s rchar/s wchar/s
01:00:00     118      14       9    0.00    0.00    3360    2506
02:00:00     118      14       9    0.00    0.00    3360    2505
03:00:00     118      14       9    0.00    0.00    3361    2506
04:00:00     118      14       9    0.01    0.00    3363    2506
05:00:00     118      14       9    0.00    0.00    3360    2505
06:00:00     118      14       9    0.00    0.00    3360    2505
07:00:00     118      14       9    0.00    0.00    3360    2505
08:00:00     118      14       9    0.00    0.00    3360    2505
08:20:01     120      14       9    0.00    0.00    3394    2522
08:40:00     119      14       9    0.01    0.01    3357    2502
09:00:00     119      14       9    0.01    0.00    3356    2500
09:20:01     437      76      48    0.04    0.04   19606    6531
09:40:01     585     117      73    0.00    0.00   12962   10119
10:00:02     564      97      60    0.03    0.03   16354    6196

Average      159      22      14    0.01    0.01    4657    3017