Use the sar -q command to report the following information:
The Average queue length while the queue is occupied.
The percentage of time that the queue is occupied.
$ sar -q 00:00:00 runq-sz %runocc swpq-sz %swpocc |
The following list describes the output from the -q option.
The number of kernel threads in memory that are waiting for a CPU to run. Typically, this value should be less than 2. Consistently higher values mean that the system might be CPU-bound.
The percentage of time that the dispatch queues are occupied.
No longer reported by the sar command.
No longer reported by the sar command.
The following example shows output from the sar -q command. If the %runocc value is high (greater than 90 percent) and the runq-sz value is greater than 2, the CPU is heavily loaded and response is degraded. In this case, additional CPU capacity might be required to obtain acceptable system response.
$ sar -q SunOS balmyday 5.10 s10_51 sun4u 03/18/2004 00:00:04 runq-sz %runocc swpq-sz %swpocc 01:00:00 1.0 0 0.0 0 02:00:01 1.3 0 0.0 0 03:00:00 1.0 0 0.0 0 04:00:00 1.0 0 0.0 0 05:00:00 1.0 0 0.0 0 06:00:00 2.0 0 0.0 0 07:00:00 0.0 0 0.0 0 08:00:00 1.0 0 0.0 0 08:20:00 1.0 0 0.0 0 08:40:01 2.0 0 0.0 0 09:00:00 0.0 0 0.0 0 09:20:00 1.0 0 0.0 0 09:40:00 1.2 2 0.0 0 10:00:00 1.2 2 0.0 0 10:20:00 1.0 1 0.0 0 10:40:00 1.3 9 0.0 0 11:00:00 1.2 7 0.0 0 Average 1.2 1 0.0 0 |