nmon_printer: quick view into NMON files

Many administrators use NMON to collect performance data on AIX systems. The collected data can then be visualized graphically with the NMON analyzer for example. Alternatively, one can of course also use njmon. Sometimes you want to take a quick look into an NMON file on the AIX system itself. Of course, this can be done with grep, awk, and other standard UNIX utilities. However, the appropriate command line must always be considered and typed in and the output is not always very readable.

For such a quick look into an NMON file, we have provided the script nmon_printer in our download area. With the nmon_printer you can easily list which data records have been collected in the NMON file:

$ nmon_printer -l aix01_200718.nmon
CPU_ALL -     CPU Total aix01
CPU01 -       CPU 1 aix01
CPU02 -       CPU 2 aix01
CPU03 -       CPU 3 aix01
CPU04 -       CPU 4 aix01
CPU05 -       CPU 5 aix01
CPU06 -       CPU 6 aix01
CPU07 -       CPU 7 aix01
CPU08 -       CPU 8 aix01
MEM -         Memory aix01
MEMNEW -      Memory New aix01
MEMUSE -      Memory Use aix01
PAGE -        Paging aix01
...
$

To display the data records, in addition to the NMON file, you must also specify the desired data record to be displayed, upper or lower case is irrelevant. Here is an example of CPU_ALL:

$ nmon_printer aix01_200718.nmon cpu_all
  CPU_ALL             Timestamp  User%  Sys%  Wait%  Idle%  Busy  PhysicalCPUs 
  CPU_ALL  00:05:15 17-JUL-2020    1.2   3.0    0.1   95.7   4.2              8
  CPU_ALL  00:10:15 17-JUL-2020    1.3   2.7    0.0   96.0   3.9              8
  CPU_ALL  00:15:15 17-JUL-2020    1.0   2.3    0.1   96.7   3.3              8
  CPU_ALL  00:20:16 17-JUL-2020    5.1   3.0    0.1   91.8   8.2              8
  CPU_ALL  00:25:16 17-JUL-2020    1.2   2.7    0.0   96.0   3.9              8
  CPU_ALL  00:30:16 17-JUL-2020    1.1  17.5    0.1   81.3  18.5              8
  CPU_ALL  00:35:16 17-JUL-2020    1.1   5.8    0.0   93.1   6.9              8
...
$

In some cases, a data record has so many fields that long lines have to be broken and the output becomes somewhat confusing. The data record LPAR has e.g. 23 fields! In such cases, or if you are only interested in certain fields, you can specify the desired fields with the ‘-f‘ option. You can either specify the desired fields separated by commas:

$ nmon_printer -f 0,1,2,13,14,15 aix01_200718.nmon lpar
  LPAR             Timestamp  PhysicalCPU  EC_User%  EC_Sys%  EC_Wait%
  LPAR  00:05:15 17-JUL-2020        0.037      1.23     2.95      0.00
  LPAR  00:10:15 17-JUL-2020        0.034      1.28     2.66      0.00
  LPAR  00:15:15 17-JUL-2020        0.029      1.03     2.25      0.00
  LPAR  00:20:16 17-JUL-2020        0.064      5.14     3.01      0.00
  LPAR  00:25:16 17-JUL-2020        0.035      1.21     2.69      0.00
  LPAR  00:30:16 17-JUL-2020        0.150      1.08    17.46      0.02
  LPAR  00:35:16 17-JUL-2020        0.063      1.13     5.77      0.00
  LPAR  00:40:16 17-JUL-2020        0.030      1.13     2.24      0.00
  LPAR  00:45:16 17-JUL-2020        0.030      1.06     2.34      0.00
...
$

Or you can also specify ranges (e.g. 0-2 or 13-15):

$ nmon_printer -f 1,5-7 aix01_200718.nmon ioadapt
             Timestamp  fcs1_read-KB/s  fcs1_write-KB/s  fcs1_xfer-tps
  00:05:15 17-JUL-2020             0.0             27.3            3.0
  00:10:15 17-JUL-2020             0.0              0.0            2.6
  00:15:15 17-JUL-2020             0.0             13.6            2.8
  00:20:16 17-JUL-2020             0.0             13.6            2.3
  00:25:16 17-JUL-2020             0.0             13.7            2.3
  00:30:16 17-JUL-2020            27.3           4982.5           89.4
  00:35:16 17-JUL-2020            13.7             27.3            4.1
  00:40:16 17-JUL-2020             0.0             13.6            2.6
  00:45:16 17-JUL-2020             0.0             13.6            2.6
...
$

The fields are counted starting from 0.

HSCLB505 The partition cannot use hardware-accelerated encryption

When migrating LPARs using LPM onto a somewhat older hardware, the following error can occur:

HSCLB505 The partition cannot use hardware-accelerated encryption on the destination managed system because the destination managed system does not support hardware-accelerated encryption.

This means that hardware-accelerated encryption is activated for the LPAR, but is not supported on the destination managed system.

Disabling hardware-accelerated encryption using the LPAR-Tool is easy:

$ lpar -d chmem lpar01 hardware_mem_encryption=0
$

Without the LPAR-Tool this is of course also possible. Log into your HMC and use the following command from the commandoline:

chhwres -m ms01 -r mem -o s -p lpar01 -a 'hardware_mem_encryption=0'

Afterwards validation and migration using LPM should work.

HSCLB504 The migrating partition cannot use hardware-accelerated Active Memory Expansion

When migrating LPARs using LPM onto a somewhat older hardware, the following error can occur:

HSCLB504 The migrating partition cannot use hardware-accelerated Active Memory Expansion on the destination managed system because the destination managed system does not support hardware-accelerated Active Memory Expansion.

This means that Active Memory Erweiterung (AME) is activated for the LPAR, but is not supported on the destination managed system.

Disabling Active Memory Expansion using the LPAR-Tool is easy:

$ lpar -d chmem lpar01 hardware_mem_expansion=0
$

Without the LPAR-Tool this is of course also possible. Log into your HMC and use the following command from the commandoline:

chhwres -m ms01 -r mem -o s -p lpar01 -a 'hardware_mem_expansion=0'

Afterwards validation and migration using LPM should work.

AIX-Lifecycle at your fingertips

How often have you searched the lifecycle informations (start of general availability and end of support) for AIX, VIOS, PowerHA or HMC via Google?

This information can also be found easily using the command line of the IBM FLRT API (https://www14.software.ibm.com/webapp/set2/flrt/sas?page=jsonapi). All you need is:

  • a direct internet connection or connection via an HTTP proxy
  • an installed version of curl

You can get an overview of all AIX versions with the help of the following curl command:

$ curl "https://www14.software.ibm.com/support/customercare/flrt/liteTable?prodKey=aix&format=json"
{"results": [
{
"input": "7200-04-02",
"inputurl": "http://www.ibm.com/support/fixcentral/aix/quickorder?fixids=U887468&function=fixId&includeRequisites=1&includeSupersedes=0&release=7.2&source=flrt",
"ga": "2020.05.15",
"eosps": "2022.11.30"
},
{
"input": "7200-04-01",
"inputurl": "http://www.ibm.com/support/fixcentral/aix/quickorder?fixids=U886355&function=fixId&includeRequisites=1&includeSupersedes=0&release=7.2&source=flrt",
"ga": "2019.11.15",
"eosps": "2022.11.30"
},
...

The output is in JSON format and is greatly shortened in the example.

We packed everything necessary in a small shell script (show_life_cycle) and made it available in our download area  (https://powercampus.de/download).

Here is a sample run of the script without arguments:

$ show_life_cycle 
VERSION          GA          EOSPS       UPDATE           UPGRADE
7200-04-02       2020.05.15  2022.11.30  -                -
7200-04-01       2019.11.15  2022.11.30  -                -
7200-04-00       2019.11.15  2022.11.30  7200-04-01       -
7200-03-04       2020.02.14  2021.09.30  -                7200-04-01
7200-03-03       2019.05.10  2021.09.30  7200-03-04       7200-04-01 
7200-03-02       2018.11.16  2021.09.30  7200-03-04       7200-04-01
...

All AIX versions are listed. However, other products can be selected for display via an argument, e.g. RHEL versions, SLES versions, VIOS versions, HMC versions, PowerHA versions and even HMC models or power systems. A complete list can be found at https://www14.software.ibm.com/webapp/set2/flrt/doc?page=prodTable. Here is a list of the RHEL versions as an example:

$ show_life_cycle rhel
VERSION          GA          EOSPS       UPDATE           UPGRADE
8.0              2019.05.07  NA          -                -
7.7              2019.08.06  NA          -                -
7.6              2018.10.30  NA          7.7              -
7.5              2018.04.10  NA          7.7              -
7.4              2017.07.31  NA          7.7              -
7.3              2016.11.03  NA          7.7              -
7.2              2015.11.19  NA          7.7              -
7.1              2015.03.05  NA          7.7              -
7.0              2014.06.10  2015.03.05  7.7              -
6.10             2018.06.19  NA          -                7.6
6.9              2017.03.21  NA          6.10             7.6
6.8              2016.05.10  NA          6.10             7.6
6.7              2015.07.22  NA          6.10             7.6
6.6              2014.10.14  NA          6.10             7.6
6.5              2013.11.21  2014.10.14  6.10             7.6
...

The output is very long in some cases. An additional argument can be used to specify a prefix for the desired versions, shown here using PowerHA 7.2.2 as an example:

$ show_life_cycle hacmp 7.2.2
VERSION          GA          EOSPS       UPDATE           UPGRADE
7.2.2.4          2020.05.28  2021.04.30  -                7.2.3.2
7.2.2.3          2019.09.13  2021.04.30  -                7.2.3.2
7.2.2.2          2018.11.30  2021.04.30  7.2.2.3          7.2.3.2
7.2.2.1          2018.06.29  2021.04.30  7.2.2.3          7.2.3.2
7.2.2            2017.12.15  2021.04.30  7.2.2.3          7.2.3.2
$

If only a connection using a proxy is possible, then the following options are available:

1. The HTTP proxy is specified using the ‘-p‘ option, e.g..:

$ show_life_cycle -p http://10.0.0.3:8000 hmc V9
VERSION          GA          EOSPS       UPDATE           UPGRADE
V9 R1 M941       2020.05.22  2021.04.30  -                -
V9 R1 M940       2019.11.22  2021.04.30  -                -
V9 R1 M931       2019.09.11  2021.04.30  -                -
V9 R1 M930       2019.05.17  2021.04.30  V9 R1 M931       -
V9 R1 M921       2018.11.16  2021.04.30  V9 R1 M931       -
V9 R1 M920       2018.08.17  2021.04.30  V9 R1 M931       -
V9 R1 M911       2018.05.25  2021.04.30  V9 R1 M931       -
V9 R1 M910       2018.03.20  2021.04.30  V9 R1 M931       -
$

2. The HTTP proxy is set directly in the script, shell variable PROXY:

$ grep ^PROXY show_life_cycle 
PROXY="http://10.0.0.3:8000"
$

3. If the script is executed as root on AIX, the proxy configuration of the Electronic Service Agent (ESA) is automatically taken over. This can be overwritten by using the command line option ‘-p‘ or by setting the variable PROXY.

The script should run on any UNIX system with a Korn shell (including MacOS). This means that searching via Google for lifecycle data is no longer necessary.

On the subject of Inventory Scout we have an article Automating Inventory Scout and another script for download available!