4.11.3 Detecting Bottlenecks on UNIX
On UNIX systems, the sar
(1) command provides
valuable performance information that can be used to find system
bottlenecks. You can use the sar
(1) command to:
- Sample cumulative activity counters in the operating system at predetermined intervals.
- Extract data from a system file.
The following table describes the sar
(1) command
options.
Table 4-6 sar(1) Command Options (Continued)
Option | Description |
---|---|
-u
|
Gathers CPU utilization numbers, including the portion of the time running in user mode, running in system mode, idle with some process waiting for block I/O, and otherwise idle. |
-b
|
Reports buffer activity, including transfers per second of data between system buffers and disk, or other block devices. |
-c
|
Reports system call activity. This includes system calls of all
types, as well as specific system calls such as
fork(2) and exec(2) .
|
-w
|
Monitors system swapping activity. This includes the number of transfers for swap-ins and swap-outs. |
-q
|
Reports average queue lengths while occupied and the percent of time occupied. |
-m
|
Reports message and system semaphore activities, including the number of primitives per second. |
-p
|
Reports paging activity, including the address translation page faults, page faults and protection errors, and the valid pages reclaimed for free lists. |
-r
|
Reports unused memory pages and disk blocks, including the average number of pages available to user processes and the disk blocks available for process swapping. |
Note:
Some UNIX platforms do not provide thesar
(1) command, but offer equivalent commands instead. BSD, for example, offers the iostat
(1) command. Sun Microsystems, Inc. offers perfmeter
(1).
Parent topic: Measuring System Traffic