AIXEnableDiskStats

How to enable disk statistics

Overview:

For performance reason, disk statistics are not always enabled on an AIX machine.

This results in weird display of the topas command, such as this one:

Topas Monitor for host:    galactus             EVENTS/QUEUES    FILE/TTY
Fri Sep  4 12:54:25 2009   Interval:  2         Cswitch   33181  Readch  3855.9K
                                                Syscall   99586  Writech 2356.6K
Kernel   14.1   |#####                       |  Reads     12686  Rawin         0
User     19.3   |######                      |  Writes    12154  Ttyout     8533
Wait      1.1   |#                           |  Forks        85  Igets         0
Idle     65.5   |###################         |  Execs        85  Namei      4108
                                                Runqueue    1.5  Dirblk        0
Network  KBPS   I-Pack  O-Pack   KB-In  KB-Out  Waitqueue   0.0
lo0    5260.3     11.7K   11.7K 2630.1  2630.1
en4      16.2     21.5    12.0     1.8    14.3  PAGING           MEMORY
                                                Faults     8065  Real,MB   32064
Disk    Busy%     KBPS     TPS KB-Read KB-Writ  Steals        0  % Comp     63
hdisk2    0.0   442.0    41.0   122.0   320.0   PgspIn        0  % Noncomp  19
hdisk0    0.0     0.0     0.0     0.0     0.0   PgspOut       0  % Client   19
hdisk1    0.0     0.0     0.0     0.0     0.0   PageIn       30
cd0       0.0     0.0     0.0     0.0     0.0   PageOut      80  PAGING SPACE
                                                Sios        111  Size,MB   51712
Name            PID  CPU%  PgSp Owner                            % Used      0
oracle      3084532  12.6   7.2 oracle          NFS (calls/sec)  % Free    100
persrv      1200130  10.1  38.1 zkxprod         ServerV2       0
devsrv       848030   1.0  20.3 zkxprod         ClientV2       0   Press:
oracle       876716   0.4  10.0 oracle          ServerV3       0   "h" for help
dbasrv      3551468   0.2  25.8 zkxprod         ClientV3       0   "q" to quit

Hmmm... All disk are 0% busy? How come?

Let's switch to disk statistics for a less crowded display:

Topas Monitor for host:    galactus    Interval:   2    Fri Sep  4 12:57:42 2009
===============================================================================
Disk     Busy%  KBPS     TPS   KB-R   ART   MRT   KB-W   AWT   MWT   AQW    AQD
hdisk0     0.0   0.0     0.0    0.0   0.0   0.0    0.0   0.0  35.6   0.0    0.0
hdisk1     0.0   0.0     0.0    0.0   0.0   0.0    0.0   0.0  37.5   0.0    0.0
hdisk2     0.0 684.0    40.5    0.0   0.0  45.0  684.0   0.9 100.3   0.1    0.0
cd0        0.0   0.0     0.0    0.0   0.0   0.0    0.0   0.0   0.0   0.0    0.0
hdisk3     0.0   0.0     0.0    0.0   0.0   0.0    0.0   0.0   2.0   0.0    0.0

Now, that is really strange... ?? You can see write and read operations being performed, but the overall performance of the disks is still at 0%.

Let's try the command iostat:

bash-3.2# iostat

System configuration: lcpu=8 drives=5 paths=4 vdisks=0

tty:      tin         tout    avg-cpu: % user % sys % idle % iowait
          0.6        267.6               19.5   4.9   74.0      1.6
                " Disk history since boot not available. "

Aha! Here is a hint that something is wrong...

Switching on the disk statistics:

This is done really quickly. Let's start by checking the current values:

bash-3.2# lsattr -E -l sys0 -a iostat
iostat false Continuously maintain DISK I/O history True

You can see above that the iostat is false: hence the issue detailed above.

Let's switch on the iostat reporting:

bash-3.2# chdev -l sys0 -a iostat=true
sys0 changed

Followed by a quick check:

bash-3.2# iostat

System configuration: lcpu=8 drives=5 paths=4 vdisks=0

tty:      tin         tout    avg-cpu: % user % sys % idle % iowait
          0.6        270.5               19.5   4.9   74.0      1.6

Disks:        % tm_act     Kbps      tps    Kb_read   Kb_wrtn
hdisk1           0.0       0.0       0.0        104         4
hdisk0           0.0       0.0       0.0         98        64
hdisk2           0.0       0.2       0.0       1252     73868
hdisk3           0.0       0.0       0.0          0        20
cd0              0.0       0.0       0.0          0         0

That looks much better - the command topas also displays better numbers interactively.

You can also do this using smitty: see the second link in the "See Also" section below.

Hope this helps!

See Also: