System Administration Guide, Volume 2

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 table below describes the following system call categories 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 36-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 busy four- to six-user system) 

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 four- to six-user system); this number will increase if shell scripts are running

exec/d

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.8 Generic sun4u    09/07/99

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