AIX Tip of the Week

Identifying an AIX LPAR Partition ID

Audience: All

Date: June 6, 2003

The uname -L command identifies a partition on a system with multiple LPARS. The LPAR id can be useful for writing shell scripts that customize system settings such as IP address or hostname

The output of the command looks like:

# uname -L
1 lpar01

The output of uname -L varies by maintenance level. For consistent output across maintenance levels, add a -s flag. For illustrate, the following command assigns the partition number to the variable "lpar_number" and partiton name to "lpar_name".

uname -Ls | read junk lpar_number lpar_name


Bruce Spencer,
baspence@us.ibm.com