21.02.2013 Views

AIX 5L Problem Determination - IBM Redbooks

AIX 5L Problem Determination - IBM Redbooks

AIX 5L Problem Determination - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

10.1.2 The vmstat command<br />

The vmstat command reports statistics about kernel threads, virtual memory,<br />

disks, traps, and CPU activity. Reports generated by the vmstat command can<br />

be used to balance system load activity. These system-wide statistics (among all<br />

processors) are calculated as averages for values expressed as percentages,<br />

and as sums otherwise. For a CPU point of view, the highlighted two left-hand<br />

columns and the four highlighted right-hand columns provide useful data, as<br />

shown in the following example. The columns are discussed in the following<br />

sections.<br />

# vmstat 2<br />

kthr memory page faults cpu<br />

----- ----------- ------------------------ ------------ ----------r<br />

b avm fre re pi po fr sr cy in sy cs us sy id wa<br />

0 0 16998 14612 0 0 0 0 0 0 101 10 8 55 0 44 0<br />

0 1 16998 14611 0 0 0 0 0 0 411 2199 54 0 0 99 0<br />

0 1 16784 14850 0 0 0 0 0 0 412 120 51 0 0 99 0<br />

0 1 16784 14850 0 0 0 0 0 0 412 88 50 0 0 99 0<br />

The kthr columns<br />

The kthr columns show how kernel threads are placed on various queues per<br />

second over the sampling interval.<br />

The r column<br />

The r column shows the average number of kernel threads waiting on the run<br />

queue per second. This field indicates the number of threads that can be run.<br />

This value should be less than five for non-SMP systems. For SMP systems, this<br />

value should be less than:<br />

5 x (Ntotal - Nbind)<br />

Where Ntotal stands for the total number of processors, and Nbind for the<br />

number of processors that have been bound to processes, for example, with the<br />

bindprocessor command.<br />

If this number increases rapidly, examine the applications. However, some<br />

systems may be running normally with 10 to 15 threads on their run queue,<br />

depending on the thread tasks and the amount of time they run.<br />

The b column<br />

The b column shows the average number of kernel threads in the wait queue per<br />

second. These threads are waiting for resources or I/O. Threads are also located<br />

in the wait queue when waiting for one of their thread pages to be paged in. This<br />

value is usually near zero. But, if the run-queue value increases, the wait queue<br />

normally also increases. If processes are suspended due to memory load<br />

238 <strong>IBM</strong> ^ Certification Study Guide - <strong>AIX</strong> <strong>5L</strong> <strong>Problem</strong> <strong>Determination</strong> Tools and Techniques

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!