The LPAR tool can administer HMCs, managed systems, LPARs and virtual-I/O-servers via the command line. The current version of the LPAR tool (currently 1.4.0.2) can be downloaded from our download page https://powercampus.de/download. A trial license, valid until October 31, is included. This article will show you some simple but useful applications of the LPAR tool.
A common question in larger environments (multiple HMCs, many managed systems) is: where is a particular LPAR? This question can easily be answered with the LPAR tool, by using the command “lpar show“:
$ lpar show lpar02 NAME ID SERIAL LPAR_ENV MS HMCS lpar02 39 123456789 aixlinux ms21 hmc01,hmc02 $
In addition to the name, the LPAR-ID and the serial number, the managed system, here ms21, and the associated HMCs, here hmc01 and hmc02, are also shown. You can also specify multiple LPARs and/or wildcards:
$ lpar show lpar02 lpar01 ... $ lpar show lpar* ... $
If no argument is given, all LPARs are listed.
Another question that frequently arises is the status of an LPAR or multiple LPARs. Again, this can be easily answered, this time with the command “lpar status“:
$ lpar status lpar02 NAME LPAR_ID LPAR_ENV STATE PROFILE SYNC RMC PROCS PROC_UNITS MEM OS_VERSION lpar02 39 aixlinux Running standard 0 active 1 0.7 7168 AIX 7.2 7200-03-02-1846 $
The LPAR lpar02 is Running, the profile used is standard, the RMC connection is active and the LPAR is running AIX 7.2 (TL3 SP2). The LPAR has 1 processor core, with 0.7 processing units and 7 GB RAM. The column SYNC indicates whether the current configuration is synchronized with the profile (attribute sync_curr_profile).
Of course, several LPARs or even all LPARs can be specified here.
If you want to see what the LPAR tool does in the background: for most commands you can specify the option “-v” for verbose-only. The HMC commands will then be listed, but no changes will be made to the HMC. Here are the HMC commands that are issued for the status output:
$ lpar status -v lpar02 hmc01: lssyscfg -r lpar -m ms21 hmc01: lshwres -r mem -m ms21 --level lpar hmc01: lshwres -r proc -m ms21 --level lpar $
Next, the addition of additional RAM will be shown. We start with the status of the LPAR:
$ lpar status lpar02 NAME LPAR_ID LPAR_ENV STATE PROFILE SYNC RMC PROCS PROC_UNITS MEM OS_VERSION lpar02 39 aixlinux Running standard 0 active 1 0.7 7168 AIX 7.2 7200-03-02-1846 $
The LPAR is running and RMC is active, so a DLPAR operation should be possible. We will first check if the maximum memory size is already in use:
$ lpar lsmem lpar02 MEMORY MEMORY HUGE_PAGES LPAR_NAME MODE AME MIN CURR MAX MIN CURR MAX lpar02 ded 0.0 2048 7168 8192 0 0 0 $
Currently the LPAR uses 7 GB and a maximum of 8 GB are possible. Extending the memory by 1 GB (1024 MB) should be possible. We add the memory by using the command “lpar addmem“:
$ lpar addmem lpar02 1024 $
We check the success by starting the command “lpar lsmem” again:
$ lpar lsmem lpar02 MEMORY MEMORY HUGE_PAGES LPAR_NAME MODE AME MIN CURR MAX MIN CURR MAX lpar02 ded 0.0 2048 8192 8192 0 0 0 $
(By the way: if the current configuration is not synchronized with the current profile, attribute sync_curr_profile, then the LPAR tool also updates the profile!)
Virtual adapters can be listed using “lpar lsvslot“:
$ lpar lsvslot lpar02 SLOT REQ ADAPTER_TYPE STATE DATA 0 Yes serial/server 1 remote: (any)/any connect_status=unavailable hmc=1 1 Yes serial/server 1 remote: (any)/any connect_status=unavailable hmc=1 2 No eth 1 PVID=123 VLANS= ETHERNET0 XXXXXXXXXXXX 6 No vnic - PVID=1234 VLANS=none XXXXXXXXXXXX failover sriov/ms21-vio1/1/3/0/2700c003/2.0/2.0/20/100.0/100.0,sriov/ms21-vio2/2/1/0/27004004/2.0/2.0/10/100.0/100.0 10 No fc/client 1 remote: ms21-vio1(1)/47 c050760XXXXX0016,c050760XXXXX0017 20 No fc/client 1 remote: ms21-vio2(2)/25 c050760XXXXX0018,c050760XXXXX0019 21 No scsi/client 1 remote: ms21-vio2(2)/20 $
The example shows virtual FC and SCSI adapters as well as a vNIC adapter in slot 6.
Finally, we’ll show how to start a console for an LPAR:
$ lpar console lpar02 Open in progress Open Completed. … AIX Version 7 Copyright IBM Corporation, 1982, 2018. Console login: …
The console can be terminated with “~.“.
Of course, the LPAR tool can do much more.
To be continued.