Use the sar -q command to report the average queue length while the queue is occupied, and the percentage of time that the queue is occupied.
$ sar -q SunOS venus 5.6 Generic sun4m 08/20/96 00:00:03 runq-sz %runocc swpq-sz %swpocc 01:00:02 1.1 0 |
The number of LWPs swapped out may greater than zero even if the system has an abundance of free memory. This happens when a sleeping LWP is swapped out and has not been awakened (for example, a process or LWP sleeping, waiting for the keyboard or mouse input).
Output from the -q option is described in Table 64-15.
Table 64-15 Output From the sar -q Command
Field Name |
Description |
---|---|
runq-sz |
The number of kernel threads in memory waiting for a CPU to run. Typically, this value should be less than 2. Consistently higher values mean that the system may be CPU-bound. |
%runocc |
The percentage of time the dispatch queues are occupied. |
swpq-sz |
The average number of swapped out LWPs. |
%swpocc |
The percentage of time LWPs are swapped out. |
The following example shows output from the sar -q command. If %runocc is high (greater than 90 percent) and runq-sz is greater than 2, the CPU is heavily loaded and response is degraded. In this case, additional CPU capacity may be required to obtain acceptable system response.
$ sar -q SunOS venus 5.6 Generic sun4m 08/20/96 14:28:12 runq-sz %runocc swpq-sz %swpocc 14:29:12 1.2 53 1 100 14:30:12 1.3 38 14:31:12 1.1 37 Average 1.2 43 |