Tanti Technology

My photo
Bangalore, karnataka, India
Sandeep Kumar | Founder, Tanti Technologies At Tanti Technologies, I share practical knowledge, hands-on tutorials, and real-world solutions across Python, SQL, Docker, Kubernetes, CI/CD, AWS, Azure, Machine Learning, Generative AI, and Agentic AI. My mission is to simplify complex technologies and provide actionable insights that help developers, engineers, and businesses learn faster, build better, automate smarter, and innovate with confidence. šŸš€ Learn • Build • Automate • Innovate Follow Tanti Technologies for practical technology insights and next-generation AI solutions.

Tuesday, 10 December 2013

Memory Leaks (on AIX 5.3.0 and above)



Technote (troubleshooting)

Problem(Abstract)

Determining memory leaks

Symptom

The AIX system will appear to be hung, or the "0403-031 Fork function failed" error will be generated.
Cause
Processes requesting additional memory are killed once the system runs low on paging space. The system appears hung as new processes and telnet connections are terminated. Error messages such as 'Not enough memory' or 'Fork function failed' errors are generated. 

Environment
AIX

Diagnosing the problem
The following AIX commands are used to monitor processes' real memory and paging space usage:

When a system hangs, there are three ways to resolve this situation.

1. Add additional paging space. To know how much paging space is "enough", use the lsps -s command often to get a feel for the Percent Used of the paging space. Based on this percentage, a system at its maximum workload should have no more than 80% of paging space used. Example output of the command lsps -s looks like the following:

#lsps -s
Total Paging Space   Percent Used
      5376MB               1%
#

2. Systems often have plenty of paging space (sometimes 3-4 times RAM) and can still run out. This could be due to a memory leak. The question then is which process is causing the memory leak. Discussed below are ways to find out what process is causing the memory leak and the tools used to accomplish this task.

a. The command 
ps vg provides useful information. In this case the data in the column labeled SIZE is needed. The SIZE column reports virtual memory (paging space) usage on a per-process basis, in 1KB units. Sample output from ps vg | pg looks like the following:



Collect ps vg output at different instances throughout the period of time that Percent Used from lsps -s grows to 99%. The output can then be examined for large numerical increases from the SIZE column. This process would exhibit extraordinarily large increases in the amount of paging space it uses between the many ps vg readings.

b. One could write a Kornshell script to collect this data and to do the comparison.

c. Another tool that can be used to track a memory leak is 
svmon.
NOTE: The fileset bos.perf.tools (on AIX 5.2 and above) must be installed in order to use svmon. To check to see if this fileset is installed, enter:
lslpp -l bos.perf.tools 
As root, enter the following command:

svmon -Pu | more 
This will list the top memory consumers in decreasing order, the first process being the largest consumer. The rest of the report shows memory and paging space usage for each segment of each process. Sample output looks like the following:



In each process report, find items in the Type column identified as "work", and in the Description column identified as "process private", and check how many 4KB (4096-byte) pages are used under the Pgspace column. This is the minimum number of working pages this segment is using in all of virtual memory. A Pgspace number that grows but never decreases may indicate a memory leak.

*Note: To truncate 'svmon -Pu' output (to make it more user friendly):

- On AIX 5.2.0 and AIX 5.3.0:
svmon -Pu|grep -p Pid|grep -v Pin|grep -v "^-"|sort +3

- On AIX 6.1.0:svmon -P -O summary=basic,unit=MB
d. Another method than can be used to determine a memory leak is to compare 'svmon -Pu' & 'svmon -Sg' output:
- Run the following commands:
svmon -Pu > /
svmon -Sg > /

- Select a 'Vsid' (Virtual Segment ID) from 'svmon -Sg' output.
- Search for the same 'Vsid' in the 'svmon -Pu' output

The 'svmon -Pu' output will show segments only associated with a process.
The 'svmon -Sg' output will show all memory segments on the system; even those not associated with a process.

If memory segments are found in 'svmon -Sg' output, but not in 'svmon -Pu' output, then memory segments are most likely being allocated, but not being released after a process' completion. This will only prove if 'unused memory segments' are not being released. There's no way for us to associate those 'unused memory segments to a process that is no longer running.


3. The system may be reaching its Maximum number of PROCESSES allowed per user, or maxuproc. Depending on what maxuproc is set to (default is 128), if a user has already forked a number of processes equal to maxuproc, the system will not allow that user to fork any more processes. The maxuproc parameter can be increased via SMIT. Enter SMIT and proceed in sequence through the panels:

System Environments
Change / Show Characteristics of the Operating System.

The maxuproc parameter can also be increased with the following command:
chdev -l sys0 -a maxuproc=

The first line on this last screen is maxuproc. Increasing this number by a conservative increment (50-100 at a time) allows users to fork more processes, thus avoiding any "Out of memory" or "Cannot fork" messages.

Memory Leaks



 Technote (FAQ)
Problem
Memory Leaks
Solution
When a system hangs


When a system hangs

Processes requesting additional memory are killed once the system runs low on paging space. The system appears hung as new processes and telnet connections are terminated. Error messages such as Not enough memory or Fork function failed are generated. There are three ways to resolve this situation.

1.     Add additional paging space. To know how much paging space is "enough", use the lsps -s command often to get a feel for the %Used of the paging space. Based on this percentage, a system at its maximum workload should have no more than 80% of paging space used.
Example output of the command lsps -s looks like the following:
 Total Paging Space   Percent Used
      200MB              51%

2.     Systems often have plenty of paging space (sometimes 3-4 times RAM) and can still run out. This could be due to a memory leak. The question then is which process is causing the memory leak.
Discussed below are ways to find out what process is causing the memory leak and the tools used to accomplish this task.

a.     The command ps vg provides useful information. In this case the
 data in the column labeled SIZE is needed. The SIZE column reports virtual memory (paging space) usage on a per-process basis, in 1KB units.
Sample output from ps vg | pg looks like the following:
 PID   TTY STAT TIME PGIN SIZE  RSS   LIM TSIZ  TRS %CPU %MEM COMMAND
   0     - A   87:42    6   20    8    xx    0    0  0.1  0.0 swapper
   1     - A  191:58   94  240  240    xx   25   28  0.3  0.0 /etc/init
 516     - A 70228:47   0   16   20    xx    0    0 97.0  0.0 kproc
 774     - A    5:53    1   24   28    xx    0    0  0.0  0.0 kproc
1032     - A   28:40    0   56   56    xx    0    0  0.0  0.0 kproc
1866     - A    0:00    0   24   20    xx    0    0  0.0  0.0 kproc
2174 pts/1 A    2:55   31  420  544 32768  260  164  0.0  1.0 aixterm
2454     - A    1:32   62  272  224    xx   96   60  0.0  0.0 /usr/dt/b

Collect ps vg output at different instances throughout the period of time that %Used from lsps -s grows to 99%. The output can then be examined for large numerical increases from the SIZE column. This process would exhibit extraordinarily large increases in the amount of paging space it uses between the two ps vgreadings.

b.     One could write a Kornshell script to collect this data and to do the comparison.
c.     Another tool that can be used to track a memory leak is svmon.
NOTE: The fileset perfagent.tools must be installed in order use svmon (and other commands, such as tprof, netpmon, and filemon). To check if this is installed, enter: lslpp -1 perfagent.tools.
If you are at AIX Version 4.3.0 or higher, this file can be found on the AIX Base Operating System media on Volume 2 of the CD set.

As root, enter the following command:
    svmon -Pu | more

This will list the top memory consumers in decreasing order, the first process being the largest consumer. The rest of the report shows memory and paging space usage for each segment of each process.
Sample output looks like the following:
Pid            Command        Inuse        Pin      Pgspace
13794             dtwm         1603          1          449
Pid:  13794
Command:  dtwm
Segid  Type  Description         Inuse Pin Pgspace Address Range
b23    pers  /dev/hd2:24849          2   0       0 0..1
14a5   pers  /dev/hd2:24842          0   0       0 0..2
6179   work  lib data              131   0      98 0..891
280a   work  shared library text  1101   0      10 0..65535
181    work  private               287   1     341 0..310:65277..65535
57d5   pers  code,/dev/hd2:61722    82   0       0 0..135

In each process report, find items in the Type column identified as work and in the Description column identified as private, and check how many 4KB (4096-byte) pages are used under the Pgspace column. This is the minimum number of working pages this segment is using in all of virtual memory. A Pgspacenumber that grows but never decreases may indicate a memory leak.

3.     The system may be reaching its Maximum number of PROCESSES allowed per user, or maxuproc. Depending on what maxuproc is set to (default is 40), if a user has already forked a number of processes equal to maxuproc, the system will not allow that user to fork any more processes.
The maxuproc parameter can be increased via SMIT. Enter SMIT and proceed in sequence through the panels System Environments and then Change / Show Characteristics of the Operating System. The first line on this last screen is maxuproc. Increasing this number by a conservative increment (50-100 at a time) allows users to fork more processes, thus avoiding any Out of memory or Cannot fork messages.

Increasing the Size of a Paging Space


Technote (FAQ)
Question
Increasing the size of a paging space.
Answer
Environment
OS level: AIX 4.3.3 and above
The following are the steps and an example of how to increase the size of a paging space.
1. Determine the Physical Partitions (PP) size of the volume group, enter:
 # lsvg rootvg
3. Determine what hdisk the paging space is on and if there are free PP's by running:
 # lsps -a
 Page Space Physical Volume   Volume Group      Size %Used Active Auto Type
 hd6        hdisk0            rootvg            512MB 1     yes    yes  lv

So hd6 is on hdisk0.
Now determine if there are free PP's. Enter the following:
# lsvg -p rootvg
rootvg:
PV_NAME     PV STATE    TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0      active      542         484         108..92..67..108..10

7. How much more do you want to add? For example, if adding 1.5G (1536M), you would need an additional 48
partitions.
Amount needed (1536M) divided by PP Size (32M)equals number of additional logical partitions.
1536mg/32mg = 48 partitions
8. Add the additional number of partitions.
# smit pgsp
     Choose Change/Show Characteristics of a paging space.
     Choose your paging space.
For example:
hd6, paging00, paging01....
At the NUMBER of additional logical partitions line, input the number derived in item 3
above (from the example, this would be 48).
 Press Enter after making all desired changes.
9. Verify paging space size, enter:
 # lsps -a
Page Space Physical Volume    Volume Group Size %Used       Active Auto Type
hd6         hdisk0            rootvg 2048MB      1          yes    yes   lv

Loopback Device Support in AIX



Technote (FAQ)

Question
This technote discusses the use of the loopback device to mount file or disk images in AIX

Answer

Introduction
In AIX 6100-04-00-0943 (6.1 TL4) support for a loopback device was added to AIX and VIOS (PowerVM). This device can be used as a block device to provide access to file images.

The file image can be an ISO image, a disk image, a filesystem or a logical volume. These images can be mounted into the filesystem tree via the /usr/sbin/loopmount command.

A loopback device can be created before mounting a file image using /usr/sbin/mkdev or the loopmount command can automatically create it.

According to the AIX 6.1 manuals on Infocenter, there are some restrictions to the loopback device:

* The varyonvg command on a disk image is not supported.
* A CD ISO, and DVD UDF+ISO, and other CD/DVD images are only supported in read-only format.
* An image file can be associated with only one loopback device.
* Loopback devices are not supported in workload partitions.

Mounting a File
To mount a file on the loopback device, the loopmount command is used. In the example below the loopback device is created automatically by the command.

Remember unlike crfs the mount point directory must already exist.

# mkdir /cdmount
# loopmount -i /backup/cd_image_327874 -l loop0 -o "-V cdrfs -o ro" -m /cdmount

# df
/dev/loop0       1678304         0  100%   419576   100% /cdmount

# lsdev -C | grep loop
loop0      Available       Loopback Device

# cd /dev
# ls -l loop*
brw-rw----    1 root     system       34,  0 Nov 27 06:43 loop0
During its existence the loopback device is listed in the CuAt, CuDv and CuDvDr ODM object classes.


Unmounting a File
To unmount a file mounted on the loopback device, use /usr/sbin/loopumount. If the regular /usr/sbin/umount command is used the dynamically created loopback device will not be unconfigured.

# loopumount -l loop0 -m /cdmount
Notice that since the loop0 device was created dynamically in the previous mount it will be deleted when not needed any more.

# df | grep loop

# lsdev -C | grep loop


Possible Problems and Solutions
---------------
# loopmount -i /images/IBM.iso -l loop0 -o "-V cdrfs -o ro" -m /cdmount
1320-003 loopmount: Specified loopback device is not found in ODM
                        Customized Database

Using the -l option assumes the loopback device already exists in /dev and the ODM classes.

If the device doesn't exist you can create it with mkdev:

# mkdev -c loopback -s node -t loopback
loop0 Available
Then use loopmount with -i and -l options to mount into the filesystem tree.

---------------
# loopmount -i /images/IBM.iso -o "-V cdrfs -o ro" -m /cdmount
1320-007 loopmount: Failed to mount the imagefile

Make sure the mount point directory exists
Check the mount options. Readonly must be supplied.

Updating to a new Technology Level or Service Pack


Technote (FAQ)
Question
What is the recommended process for upgrading to a new Technology Level or Service Pack in AIX ?
Answer
-- Updating to a New Technology Level or Service Pack --

Update_All in 5.3, 6.1, and AIX 7

This document describes the recommended preparation and process when considering updating your system to a new technology level or adding a service pack to an existing technology level. In all we will review some key words and terminology, run through recommended pre-checks, discuss the update_all process using both SMIT and command line, and finally post-checks & FAQ.

Key Words / Terminology :

V.R.M.F. (Version, Release, Maintenance Level, Fix Level)
This represents your operating system level and is mentioned because of the change made in the 5300-07 technology level update. Previous to 5300-07 updates are recognized by their last numerical level entry only.
Ex.
bos.rte.install 5.3.0.60

Beginning with 5300-07 the 3rd number, or “Maintenance Level” number will also be included and will represent the Technology level of the fileset, followed by the “Fix Level”.
Ex.
bos.rte.install 5.3.7.0
*Note that the “Fix Level” entry does not necessarily represent the “Service Pack” level. Any similarity is simply coincidental.

Oslevel 
You will also notice a change to how the operating system level reads. With the introduction of 5300-06 you will notice more information provided when running the ‘oslevel’ command. 
# oslevel -s
6100-06-06-1140

The addition of the last four digits simply represents the year (11) and week (40) of the release of your technology level/service pack (-06-06).

Update_all
This is the recommended method of installation when upgrading your technology level or service pack level only. This installation method should not be used when attempting to upgrade the version or release level of your operating system.
Ex.
5300-0x to 6100-0x - do NOT use update_all
6100-0x to 7100-0x - do NOT use update_all


Recommended Pre-Checks :

1. The back-out
It is recommended to have at least one back-out method available to you in case a restore is required. Recommended back out methods include : mksysb restore, sysback restore, altinst_rootvg clone, and multibos. More information on any of these back-out methods can be found at the publib documentation site by using this link to click through to the appropriate infocenter and search features found here : 
http://publib16.boulder.ibm.com/pseries/

2. Boot Image Verification
The hd5 logical volume holds your boot image. There are a few checks to make against your boot image before starting your update_all process.
First, find out which disk contains your hd5 logical volume.
# lslv -m hd5
hd5:N/A
LP       PP1     PV1
0001     0001    hdisk0

The listing under the “PV1” column indicates on which disk hd5 is located. Any other entries under “PV2”..etc, simply represent mirrored copies.

Next, verify your boot image can be successfully recreated using the hdisk# from above and by using /dev/ipldevice.

# bosboot -ad /dev/hdisk0
bosboot: Boot image is 35795 512 byte blocks.


# bosboot -ad /dev/ipldevice
bosboot: Boot image is 35795 512 byte blocks.
If either of these two commands fail for any reason, please call the support center for resolution before proceeding.

Finally, with the continual introduction of new devices and hardware the boot images are growing larger. You will want to make sure your hd5 logical volume has enough free and contiguous space to hold the boot image. Currently the recommended allocated space to have for hd5 is 32meg. This is of concern in environments with smaller disk sizes, and should be checked before running an update. 
# lsvg -l rootvg |grep hd5
hd5 boot      1    1    1    closed/syncd       N/A



# lsvg rootvg |grep SIZE
VG STATE:     active         PP SIZE:      32 megabyte(s)


The single partition (in bold (1)) is 32meg in size. This should be enough to contain the boot image. Smaller partition sizes will require more partitions to be allocated.

Your hd5 partitions also need to be contiguous partitions. Check this by running the following command :


# lspv -M hdisk0 |grep hd5
hdisk0:1 hd5:1
hdisk0:2 hd5:2
hdisk0:3 hd5:3

You can see in this example that the hd5 logical volume covers the first 3 partitions on the disk and they are all contiguous. If your partitions are not contiguous, or are not covered on the first partitions of the disk please call the software support line for assistance with correcting this.
Again, you may only have 1 partition that is large enough to handle the boot image, or you may have multiple smaller partitions. Either is fine.

3. Firmware
Firmware should be kept up to date and be checked whenever a technology level update is considered. In general firmware updates should be applied before software updates, but that is not a rule set in stone. You should always refer to the firmware download site installation information and follow those instructions.
You can access the firmware download site here : 
http://www-933.ibm.com/support/fixcentral/

If there are any questions concerning the firmware update, installation instructions, or if there are software considerations please contact the hardware support center first.

4. Fileset Consistency
You should run the following command to check fileset consistency : 
# lppchk -v
Ideally this should return to the command line with no output. If you do receive output and are unfamiliar with how to resolve it, please call the support center for assistance before running your upgrade.

5. Space
In order to see if you have enough space for your update you can run the update_all operation in preview mode. This will provide you with anestimated system resources listing of the necessary space. In order to do this you will first have to install the fileset “bos.rte.install”. Following are two examples of how to update this fileset first, so a preview update_all can be executed. The example below shows initially “committing” the bos.rte.install update. If you would feel more comfortable using the “apply” feature in this case, feel free to do so. Note that if you do “Apply” you will need to “Commit” before continuing with the actual update_all process.

From an unmounted cdrom device (cd0).
# installp -acd /dev/cd0 bos.rte.install
From a download directory (/fixes/6100-06)
# installp -acd /fixes/6100-06 bos.rte.install

Using SMITTY

# smitty install_all
* INPUT device / directory for software         /dev/cd0
* SOFTWARE to install                           [bos.rte.install]
PREVIEW only? (install operation will NOT occur) no

Once the installation is complete you will then be able to run the preview operation on the remaining filesets to get an estimate of the required space for your update. # smitty update_all
* INPUT device / directory for software         /dev/cd0
* SOFTWARE to update                            _update_all
PREVIEW only? (update operation will NOT occur) yes


The preview will show something similar to this in regards to the space requirements :
RESOURCES
---------------
Estimated system resource requirements for filesets being installed:
(All sizes are in 512-byte blocks)

Filesystem
Needed Space
Free Space
/
402
239312
/usr
94352
165440
/var
1
237384
/tmp
52304
259240
/opt
6648
158576
Total
153707
1059952

Running the update using SMIT or command line :
This section will cover the update_all process. In all cases the “input device” (location of the software) will be referred to as being a local cdrom drive (/dev/cd0). You can always use a download directory or nfs mount point, simply substitute the input device as necessary. This process is also executed presuming you are logged in as root (as opposed to using ‘sudo’).

1. SMITTY :
By menu selection options you would take the following path :

# smittySoftware Installation and Maintenance
Install and Update Software
Update Installed Software to Latest Level (Update All)

-or use the fastpath-
# smitty update_all

INPUT device / directory for software                    /dev/cd0
SOFTWARE to update                                         _update_all
PREVIEW only? (update operation will NOT occur)            no
COMMIT software updates?                                   yes
SAVE replaced files?                                       no
AUTOMATICALLY install requisite software?                  yes
EXTEND file systems if space needed?                       yes
VERIFY install and check file sizes?                       no
DETAILED output?                                           no
Process multiple volumes?                                  yes
ACCEPT new license agreements?                             yes*
Preview new LICENSE agreements?                                 No

The only required change would be the option for “ACCEPT new license agreements”. All other given defaults should remain as they are. Pressing here will bring up a confirmation dialog box to which you press again. The only other interaction you may have is if you need to switch out a volume of the media package. When complete, the upper left corner “Command:” field will have one of two outcomes :

OK : Your installation has completed without error. You can either scroll down or exit out and view the /smit.log file for the log of the installation.

FAILED : One or more filesets failed for some reason. You can either scroll down or exit out and view the /smit.log file for the log of the installation. Corrective action should be taken before rebooting.

2. Command line :
You will use the ‘install_all_updates’ command if opting to run this from command line.
This command does have a representative manpage so feel free to review the flags, however this command was intended to be easily executed so running a basic update will not be a very long command.

# install_all_updates -Y -cd /dev/cd0


Once complete you will find the log of the installation in /var/adm/ras/install_all_updates.log. By default the fileset updates will be installed in the “APPLIED” state. The "-c" flag has been added to the above command to specify that all filesets install in the “COMMITTED” state. See the FAQ at the end of this document for more information concerning “APPLIED” vs “COMMITTED”.



Post checks :
Presuming your update_all was successful you will want to check the following commands. If you receive unexpected output please contact the support center for assistance.
* Please see FAQ statement 11 and 11a below regarding post-update_all issues.


# oslevel -r        This should return with the expected TL output# oslevel -s        This should return with the expected TL and SP output.# lppchk -v         This should come back ideally with no output.
FAQ and Opinions

This section is contains the most commonly asked questions and a few recommendations concerning the update_all. Most answers will be kept short and to the point (as much as possible).

1. Is it okay to install my Technology Level in the “APPLIED” state ? What if I want to reject the TL update if there is a problem ? 
With the introduction of Technology Levels and the “all or nothing” packaging format, these updates are bringing in on the upwards of 400+ fileset updates for each TL. Attempting to perform a “reject” process on so much code simply does not work well, and is not supported. Recommended back-out methods are discussed earlier in this document.

1a. Does the same hold true for Service Packs ? 
The Service Pack updates are certainly much smaller groups of updates....typically numbering around 40-50 per update. While you certainly will have a better chance of successfully rejecting 40 filesets instead of 400, it would still be best to have one of the back-out methods mentioned earlier.

2. Why does my update_all have problems when I use an NFS mounted cdrom ?
When running an update_all over NFS, you create your own mount point for the cdrom drive. This does not allow it to recognize the fact that there are multiple volumes available that contain the correct requisite filesets. Multiple update_all operations may be needed on each volume when NFS mounting a cdrom drive. A better option may be to ‘bffcreate’ the contents of all CDs down to a directory, then NFS mount that directory.

3. The update_all failed. What now ?
Do not reboot. You can review the log to find out what failed and why. If you are comfortable and familiar with these situations you can correct the failures and re-update the filesets. If not, please call the helpdesk and open a PMR for assistance. Have the log available to email in if necessary.

4. I need to run my update today but I may not be able to reboot until next week. Is that a problem ? 
Plans should be made to reboot as soon as the update is complete and checks have been made to ensure there were no failures. System files will have been replaced, but the corresponding kernel and library updates will not be loaded until boot time. You will likely encounter problems if you delay rebooting.

5. Is it recommended to reboot before issuing a TL upgrade ?
If this is possible, absolutely. There are systems out there that have not been rebooted in a year or more. Who is to say that something has not happened in that time that simply would not show up until a reboot. Rebooting the system first assures a good boot image, a stable system, and would isolate any problem that normally would not be caught until the post-update reboot as either a preexisting issue, or an issue directly related to the TL update itself.

6. Some say to use base AIX install media when updating the TL, others say the TL fix downloads or CDs should be used. Which is right ?
The recommendation is to use the TL fix downloads from FixCentral, or the TL CDs that can be ordered either online or from AIX SupportLine. You can also use the base AIX installation media, however without getting into a long answer, the recommendation is using the TL fix packages.

7. How long will the update_all take ?
This is a question that does not quite have a definite answer. The length of time required for the update_all depends on how many filesets are being updated as well as the available system resources such as processors and memory.
Giving a ballpark figure however, going up one TL should only take about 30-60 minutes plus reboot time. Some admins prefer to be more on the conservative side and block a 2-3 hour downtime. Consideration should also be made to the amount of time it would take to restore, depending on the backup method selected.

8. Is it okay to run the update_all while people are online ?
Updating could affect running processes. As such, applications should be down and users offline as a general rule.

9. Where can I download new service packs or technology levels ?
TL and SP updates can be acquired from the FixCentral website located here :
http://www-933.ibm.com/support/fixcentral/

10. Will product X at level Y.Z work with my new technology level ?
Some products may only be certified up to a certain operating system level while other products may require an update. The best thing to do would be to contact product X's support center. If it is an IBM product feel free to contact our support center and open a PMR requesting to speak to the product X team. Any 3rd party products should be cleared by their support before upgrading.

11. The 'oslevel -s' and/or 'oslevel -r' commands do not report what I expect after the udpate. How can I determine what is missing ?
If your 'oslevel' commands do not report correctly after your update_all you can add the "-l" flag to determine which filesets still need to be updated in order to complete your upgrade.
The syntax :
# oslevel -rl
# oslevel -sl

Example :
# oslevel -rl 6100-01
-or-
# oslevel -sl 6100-00-01-0748

The filesets listed will show an "Actual Level" heading (your current level) and a "Maintenance Level" heading (the level you need to be at to satisfy the TL/SP).

11a. Some filesets occasionally require multiple update_all operations.
There are cases where a second update_all operations need to be executed to pick up the full TL update. This is not defective behavior. Please also take note that this tip is not intended to resolve a "FAILED" status of your update_all. If you notice that your TL update was successful, but some filesets did not get updated and are on your media or in your download location, you may need to run the update_all a second time to pick them up.

12. What are other best practices with regards to keeping the AIX operating system updated?
IBM maintains a best practices site for service and support for Power Systems.
Visit 
http://www.ibm.com/support/customercare/sas/f/best for more information.

How to Setup SEA Failover on DUAL VIO servers



 
Technote (FAQ)

 
Question

How do I setup SEA failover on DUAL VIO servers (VIOS)?
This document describes some general concepts related to Shared Ethernet Adapter (SEA), and the procedure to configure SEA Failover.
 
Cause

The SEA failover fails or creates a network storm after it is created.

 Answer

Shared Ethernet Adapter

 A Shared Ethernet Adapter can be used to connect a physical network to a virtual Ethernet network. It provides the ability for several client partitions to share one physical adapter. SEA can only be configured on the Virtual I/O server (VIOS) and requires the POWER Hypervisor and Advanced POWER Virtualization feature. The SEA, hosted on the Virtual I/O server, acts as a Layer-2 bridge between the internal and external network.

Restrictions with Configuring SEA Failover

·         It can only be hosted on the VIOS and not on the client partition.

·         The VIOS running Integrated Virtualization Manager (IVM) cannot implement SEA Failover because only one single VIOS can be configured on the P5/P6 with IVM.
 
·         SEA Failover was introduced with Fixpack 7 (Virtual I/O server version 1.2), so both Virtual I/O Servers need to be at this minimum level.

Requirements for Configuring SEA Failover

·         One SEA on one VIOS acts as the primary (active) adapter and the second SEA on the second VIOS acts as a backup (standby) adapter.
 
·         Each SEA must have at least one virtual Ethernet adapter with the “Access external network” flag (previously known as “trunk” flag) checked. This enables the SEA to provide bridging functionality between the two VIO servers.
 
·         This adapter on both the SEAs has the same PVID, but will have a different priority value.
 
·         A SEA in ha_mode (Failover mode) might have more than one trunk adapters, in which case all should have the same priority value.
 
·         The priority value defines which of the two SEAs will be the primary and which will be the backup. The lower the priority value, the higher the priority, e.g. an adapter with priority 1 will have the highest priority.

·         An additional virtual Ethernet adapter , which belongs to a unique VLAN on the system, is used to create the control channel between the SEAs, and must be specified in each SEA when configured in ha_mode.
 
·         The purpose of this control channel is to communicate between the two SEA adapters to determine when a fail over should take place.
 
NOTE: If the SEA Failover will be using etherchannel as the physical device, configure the switch ports for etherchannel PRIOR to configuring the etherchannel device on the VIO server. Failure to follow this sequence may result in a network storm.

PROCEDURE:

1. Create a virtual adapter to be used in the SEA adapter on VIOS1. EX: (ent2).

To configure a virtual Ethernet adapter via Dynamic Logical Partition (DLPAR) for a running logical partition using HMC V7R3, follow these steps: 


Note: a DLPAR operation requires the partition to be on the network.

        I.            In the navigation panel, open Systems Management, open Servers, and click on the managed system on which the logical partition is located.
 
      II.            In the contents panel, select the VIOS on which you want to configure the virtual Ethernet adapter, click on the Tasks button -> choose Dynamic Logical Partitioning -> Virtual Adapters.
 
    III.            Click Actions -> Create -> Ethernet Adapter. 
 
    IV.            Enter the slot number for the virtual Ethernet adapter into Adapter ID.
 
      V.            Enter the Port Virtual LAN ID (PVID) for the virtual Ethernet adapter into VLAN ID. The PVID allows the virtual Ethernet adapter to communicate with other virtual Ethernet adapters that have the same PVID.

            Note: Give the virtual adapter a unique VLAN ID (PVID): "1" 
 
    VI.            Select IEEE 802.1 compatible adapter if you want to configure the virtual Ethernet adapter to communicate over multiple virtual LANs. If you leave this option unchecked and you want this partition to connect to multiple virtual networks, then you must create multiple virtual adapters by creating additional virtual LAN IDs.
 
  VII.            Check the box "access external network".
 
VIII.            Give the virtual adapter a low trunk priority. EX: "1"
 
    IX.            Click OK.
 
NOTE !! 

After you have finished, access any existing partition profiles for the logical partition and add the same virtual ethernet adapters to those partitions profiles. The dynamic virtual ethernet adapter will be lost if you shut down the logical partition and activate that logical partition using a partition profile that does not have the new virtual ethernet adapter in it.

2. Create another virtual adapter to be used as a Control Channel on VIOS1. EX: (ent3)

a. Give this new virtual adapter another unique VLAN ID (PVID) EX: "99"
b. Do NOT check the box "access external network".
c. Shutdown, Activate VIOS1 or run cfgdev from VIOS command line if created with DLPAR.


3. Create SEA on VIO server 1 with failover attribute:


$ mkvdev -sea ent0 -vadapter ent2 -default ent2 -defaultid 1 -attr ha_mode=auto ctl_chan=ent3

Note: The defaultid value of the SEA should be the Port VLAN ID (PVID) of the default trunk adapter, in case there are more than one trunk adapters configured in the SEA.

4. (OPTIONAL) Assign an ip address to SEA on VIOS1:

$ mktcpip -hostname vio1 -interface en4 -inetaddr 9.3.5.136 -netmask 255.255.255.0 -gateway 9.3.5.41 -nsrvaddr 9.3.4.2 -nsrvdomain itsc.austin.ibm.com -start

5. Create a virtual adapter to be used in the SEA adapter on VIOS2. EX: (ent2)

a. Give the virtual adapter the same VLAN ID (PVID) as VIOS1. EX: "1" .
b. Check the box "access external network".
c. Give the virtual adapter a higher trunk priority. EX: "2"

6. Create another virtual adapter to be used as a Control Channel on VIOS2. EX: (ent3):


a. Give this new virtual adapter the same unique VLAN ID (PVID) as the control channel on VIOS1. EX: "99"
b. Do NOT check the box "access external network".
c. Shutdown, Activate VIOS2 or run cfgdev from VIOS command line if created with DLPAR.

7. Create SEA on VIOS2 with failover attribute:

$ mkvdev -sea ent0 -vadapter ent2 -default ent2 -defaultid 1 -attr ha_mode=auto ctl_chan=ent3

8. (OPTIONAL) Assign an ip address to SEA on VIOS2:

$ mktcpip -hostname vio2 -interface en4 -inetaddr 9.3.5.137 -netmask 255.255.255.0 -gateway 9.3.5.41 -nsrvaddr 9.3.4.2 -nsrvdomain itsc.austin.ibm.com -start