Compare lslpp outputs from two hosts
I have just upgraded a couple of LPARs from AIX 6.1 to AIX 7.2 using NIMADM. One of the LPARs worked okay, but the other was missing a few file-sets, most importantly the bos.cluster.rte file-set was missing. I have not yet had time to re-do the upgrade and to figure out why some file-sets were not upgraded/installed, as a manual install of the missing file-sets fixed all the issues I was having.
How did I find all these missing file-sets? It was easy, I just used the compare_report command. Here is how it works. Note that there are other flags available to compare a servers lslpp -Lc report to a Fix Repository.
First, create an lslpp -Lc report from both the base server and the other server, and transfer the other servers report to the base server.
lslpp -Lc > /tmp/nimt001_lslpp.txt
lslpp -Lc > /tmp/pocn071_lslpp.txt
Next, run compare_report against the two files.
To see the software that is lower on the base server than the other server, use the -l flag.
compare_report -b nimt001_lslpp.txt -o pocn071_lslpp.txt -l
#(baselower.rpt)
#Base System Installed Software that is at a lower level
#Fileset_Name:Base_Level:Other_Level
gettext:0.10.40-8:0.10.40-9
To see the software that is higher on the base server than the other server, use the -h flag.
compare_report -b nimt001_lslpp.txt -o pocn071_lslpp.txt -h
#(basehigher.rpt)
#Base System Installed Software that is at a higher level
#Fileset_Name:Base_Level:Other_Level
GSKit8.gskcrypt64.ppc.rte:8.0.50.42:8.0.14.43
GSKit8.gskssl64.ppc.rte:8.0.50.42:8.0.14.43
AIX-rpm:7.2.0.0-1:6.1.6.0-7
To see the software that is missing on the other server when compared to the base server, use the -m flag.
compare_report -b nimt001_lslpp.txt -o pocn071_lslpp.txt -m
#(baseonly.rpt)
#Filesets not installed on the Other System
#Fileset_Name:Base_Level
Java7_64.jre:7.0.0.255
Java7_64.sdk:7.0.0.255
artex.base.rte:7.2.0.1
artex.base.samples:7.2.0.0
bos.ahafs:7.2.0.0
bos.alt_disk_install.boot_images:7.2.0.1
bos.cdat:7.2.0.0
bos.cluster.rte:7.2.0.1
bos.liveupdate.rte:7.2.0.1
bos.loc.iso.en_AU:7.2.0.0
bos.perf.fdpr:7.2.0.0
bos.pfcdd.rte:7.2.0.1
bos.sysmgt.hmc:7.2.0.1
bos.sysmgt.nim.master:7.2.0.0
bos.sysmgt.nim.spot:7.2.0.0
cache.mgt.rte:7.2.0.0
expect.base:5.42.1.0
expect.man.en_US:5.42.1.0
perfagent.server:7.2.0.0
powervp.rte:1.1.3.3
rsct.basic.sp:3.2.1.0
rsct.compat.basic.sp:3.2.1.0
rsct.compat.clients.sp:3.2.1.0
rsct.opt.stackdump:3.2.1.0
rsct.opt.storagerm:3.2.1.0
sysmgt.cfgassist:7.2.0.0
tcl.base:8.4.7.0
tcl.man.en_US:8.4.7.0
tivoli.tivguid:1.3.4.1
tk.base:8.4.7.0
tk.man.en_US:8.4.7.0
iperf:2.0.5-1
netperf:2.5.0-1
To manually install all the missing software, follow these steps.
Create the list of missing filesets, but we only need the fileset names, so we strip off the version numbers.
compare_report -b nimt001_lslpp.txt -o pocn071_lslpp.txt -m | awk -F: '{ print $1 }' | tee fileset.list
Now install all those filesets with installp. Remove the -p (preview) flag to run
installp -p -a -d /export/lpp_source/AIX72-TL0-SP1-BOOT -f ./fileset.list