System Administration Guide: Advanced Administration

ProcedureHow to Check System Call Statistics (sar -c)

  1. 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

Example 13–6 Checking System Call Statistics (sar -c)

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


$ sar -c

SunOS balmyday 5.10 s10_51 sun4u    03/18/2004

00:00:04 scall/s sread/s swrit/s  fork/s  exec/s rchar/s wchar/s
01:00:00      89      14       9    0.01    0.00    2906    2394
02:00:01      89      14       9    0.01    0.00    2905    2393
03:00:00      89      14       9    0.01    0.00    2908    2393
04:00:00      90      14       9    0.01    0.00    2912    2393
05:00:00      89      14       9    0.01    0.00    2905    2393
06:00:00      89      14       9    0.01    0.00    2905    2393
07:00:00      89      14       9    0.01    0.00    2905    2393
08:00:00      89      14       9    0.01    0.00    2906    2393
08:20:00      90      14       9    0.01    0.01    2914    2395
08:40:01      90      14       9    0.01    0.00    2914    2396
09:00:00      90      14       9    0.01    0.01    2915    2396
09:20:00      90      14       9    0.01    0.01    2915    2396
09:40:00     880     207     156    0.08    0.08   26671    9290
10:00:00    2020     530     322    0.14    0.13   57675   36393
10:20:00     853     129      75    0.02    0.01   10500    8594
10:40:00    2061     524     450    0.08    0.08  579217  567072
11:00:00    1658     404     350    0.07    0.06 1152916 1144203

Average      302      66      49    0.02    0.01   57842   55544

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. However, the percentage varies greatly with the activities that are being performed by the system.

Field Name 

Description 

scall/s

The number of all types of system calls per second, which is generally about 30 per second on a system with 4 to 6 users. 

sread/s

The number of read system calls per second.

swrit/s

The number of write system calls per second.

fork/s

The number of fork system calls per second, which is about 0.5 per second on a system with 4 to 6 users. This number increases if shell scripts are running.

exec/s

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

rchar/s

The number of characters (bytes) transferred by read system calls per second.

wchar/s

The number of characters (bytes) transferred by write system calls per second.