Friday, 24 July 2015

AIX performance tips and tricks

Nmon tools

nmon performance -- free tool to analyze AIX performance
This free tool gives you a huge amount of information all on one screen. Even though IBM doesn't officially support the tool and you must use it at your own risk, you can get a wealth of performance statistics. Why use five or six tools when one free tool can give you everything you need? The tool can be found here.

nmon analyser -- free tool to produce AIX performance reports
This free tool is designed to take files produced by the NMON performance tool and turn them into spreadsheets containing high quality graphs ready to cut and paste into performance reports. The tool also produces analyses for ESS and EMC subsystems. It is available for both Lotus 1-2-3 and Microsoft Excel. The tool can be found here.

Determine your AIX level

oslevel -r
[root@sys /] oslevel -r
5100-07
[root@sys /]

Determine the load of your system

By executing uptime, you get the load on your system. The load indicates the amount of programs that are being executed @ the same time.
[root@sys /] uptime
  04:19PM   up 62 days,   1:57,  3 users,  load average: 12.26, 11.86, 8.77
[root@sys /]

Determine the cpu usage (user/sys/idle/wait)

Use the command vmstat 10 10.
[root@sys /] vmstat 10 10
kthr     memory             page              faults        cpu
----- ----------- ------------------------ ------------ -----------
 r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa
 4  1 257816  2166   0   0   0 315  287   0 615 10202 1030  9 19 51 22
 8  1 257579  2412   0   0   0 147 1407   0 588 32601 1745 17 81  1  1
11  1 259625   171   0   0   0 494 10911   0 647 31634 1440 18 82  0  0
11  1 259720   270   0   0   0 281 2413   0 593 34101 1652 21 79  0  0
11  1 259282   555   0   0   0 246 2619   0 669 33614 1814 16 84  0  0
...
[root@sys /]

Determine the memory/swap usage of an AIX system

Use the commands svmon and lsps.
[root@sys /] lsps -a
Page Space  Physical Volume   Volume Group    Size   %Used  Active  Auto  Type
hd6         hdisk0            rootvg         768MB      47     yes   yes    lv
[root@sys /] svmon
               size      inuse       free        pin    virtual
memory       262128     260139        288      66603     258643
pg space     196608      91566

               work       pers       clnt      lpage
pin           66609          0          0          0
in use       228672       7884      23583          0
[root@sys /]
Svmon uses frames, multiply every frame by 1024 to get the size in bytes. Also be sure to install the packages bos.perf.tools in order to get svmon work.

Determine the IO load on your systems disks

Use the command iostat, do know thet the first entry is the entry since boot.
[root@sys /] lslpp -w /usr/bin/svmon
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/bin/svmon                              bos.perf.tools        File
[root@sys /] iostat 5 2

tty:      tin         tout   avg-cpu:  % user    % sys     % idle    % iowait
          0.1          4.8               8.7     18.5       51.2      21.6

Disks:        % tm_act     Kbps      tps    Kb_read   Kb_wrtn
hdisk1           1.6      16.4       3.5    6873724  81062953
hdisk0           1.8      16.9       3.7   10202425  80417825
cd0              0.0       0.0       0.0          0         0

tty:      tin         tout   avg-cpu:  % user    % sys     % idle    % iowait
          0.0        135.2              17.4     82.6        0.0       0.0

Disks:        % tm_act     Kbps      tps    Kb_read   Kb_wrtn
hdisk1           0.0       0.0       0.0          0         0
hdisk0           2.4      15.2       3.4         76         0
cd0              0.0       0.0       0.0          0         0
[root@sys /]
If you get as output:
[root@sys /] iostat

tty:      tin         tout   avg-cpu:  % user    % sys     % idle    % iowait
          0.1          4.8               8.7     18.5       51.2      21.6
                " Disk history since boot not available. "

[root@sys /]
you have to activate iostat counters by typing the following command: /usr/sbin/chdev -l sys0 -a "iostat=true"

AIX temperature sensors

By executing the command /usr/lpp/diagnostics/bin/uesensor, you can, on supported platform, get the fan speeds and temperature of your system:
[root@sys /] /usr/lpp/diagnostics/bin/uesensor -a
3 0 11 31 P1
9001 0 11 2100 F1
9001 1 11 2760 F2
9001 2 11 1890 F3
9001 3 11 1890 F4
9002 0 11 5129 P1
9002 1 11 3129 P1
9002 2 11 5129 P1
9002 3 11 12077 P1
9004 0 11 3 P3-V1
9004 1 11 3 P3-V2
9004 2 11 3 P3-V3
[root@sys /]

No comments:

Post a Comment