lparstat Command

Purpose

Reports the information and statistics of the logical partition (LPAR).

Syntax

lparstat { -i [ -W | -x | -s | -P | -N ] | -W | -s | -G | -P | -u | -N | -d | -m [ -e [ r | R ] [ -p [ w ] ] ] | [ -H | -h ] | [ -X [ -o filename ] ] [ -c ] | [ -E [ w ] ] = [ Interval [ Count ] ] [ -L ] }

Description

The lparstat command provides an information and utilization statistics report of the LPAR. This command provides a display of current LPAR related parameters and Hypervisor information, and utilization statistics for the LPAR. An interval mechanism retrieves numbers of reports at a certain interval.

The various options of lparstat command are exclusive of each other. The lparstat command with no options generates a single report that contains a utilization statistic that is related to the LPAR since start time. If the -h option is specified, the report includes summary statistics that are related to the Hypervisor. If an interval and count are specified, the preceding report display repeats for every interval seconds and for count iterations. interval and count cannot be used with the -i option. Only root users can run the -h and -H flags.

The interval parameter specifies the amount of time in seconds between each report. If you do not specify the interval parameter, the lparstat command generates a single report that contains statistics for the time since system startup and then exits. You can specify the count parameter only with the interval parameter. If you specify the count parameter, its value determines the number of reports that are generated and the number of seconds apart. If you specify the interval parameter without the count parameter, reports are continuously generated. Do not specify a value of zero to the count parameter.

When the lparstat command is started without the -i flag, two rows of statistics are displayed. The first row displays the System Configuration, which is displayed when the command starts and whenever a system configuration changes. The second row displays the utilization statistics, which is displayed in intervals and again anytime the values of these statistics are deltas from the previous interval.

If you specify the -X option, the lparstat command creates an XML file.

The following information is displayed in the system configuration row:
type
The type of the partition. The value can be either dedicated or shared.
mode
Indicates whether the partition processor capacity is capped or uncapped, which allows it to use idle cycles from the shared pool. Dedicated LPAR is capped or donating.
smt
Indicates whether the simultaneous multithreading is enabled or disabled in the partition. The row is displayed as ON if two SMT threads are present. However, if there are more than two SMT threads, the number of SMT threads is displayed.
lcpu
The number of online logical processors.
mem
Displays the capacity of the online memory.
Note: If Active Memory Expansion is enabled, mem specifies the expanded memory size that is configured for this LPAR. However, if the environment variable AME_MEMVIEW is set to TRUE, the mem value specifies the true memory size.
psize
Displays the number of online physical processors in the pool.
ent
Displays the entitled processing capacity in processor units. This information is displayed only if the partition type is shared.
If you specify the -m flag, the following information is displayed in the system configuration row:
lcpu
The number of online logical processors.
ent
The entitled processing capacity in processor units.
mem
Displays the capacity of the online memory.
Note: If Active Memory Expansion is enabled, mem specifies the expanded memory size that is configured for this LPAR. However, if the environment variable AME_MEMVIEW is set to TRUE, the mem value specifies the true memory size.
mpsz
Indicates the memory pool size of the pool that the partition belongs to (in GB).
iome
Indicates the I/O memory entitlement of the partition (in MB).
iomp
Indicates the number of I/O memory entitlement pools in the LPAR.
If you specify the -c flag, the following additional information is displayed in the system configuration row:
mmode
Indicates the memory mode of the system. The following values are the values of the mmode:
Table 1. Memory mode values
Item Description
Ded Active Memory Sharing and Active Memory Expansion are not enabled.
Shar Active Memory Sharing is enabled.
Ded-E Active Memory Expansion is enabled.
Shar-E Both Active Memory Sharing and Active Memory Expansion are enabled.
mem
Indicates the expanded memory size of the LPAR.
tmem
Indicates the true memory size of the LPAR.
The following information is displayed in the utilization row:
%user
Indicates the percentage of the entitled processing capacity that is used while you run at the user level (application).

For dedicated partitions, the entitled processing capacity is the number of physical processors.

For uncapped partitions whose current physical processor consumption exceeds their entitled capacity, the percentage is relative to the number of physical processors used (physc).

%sys
Indicates the percentage of the entitled processing capacity that is used while you run at the system level (kernel).

For dedicated partitions, the entitled processing capacity is the number of physical processors.

For uncapped partitions whose current physical processor consumption exceeds their entitled capacity, the percentage becomes relative to the number of physical processors consumed (physc).

%idle
Indicates the percentage of the entitled processing capacity unused while the partition was idle and did not have any outstanding disk I/O request.

For dedicated partitions, the entitled processing capacity is the number of physical processors.

For uncapped partitions whose current physical processor consumption exceeds their entitled capacity, the percentage becomes relative to the number of physical processors consumed (physc).

%wait
Indicates the percentage of the entitled processing capacity unused while the partition was idle and had outstanding disk I/O requests.

For dedicated partitions, the entitled processing capacity is the number of physical processors.

For uncapped partitions whose current physical processor consumption exceeds their entitled capacity, the percentage is relative to the number of physical processors consumed (physc).

The following statistics are displayed when the type of partition type is either shared or dedicated or donating:
physc
Indicates the number of physical processors consumed.
vcsw
Indicates the number of virtual context switches that are virtual-processor hardware preemption.
The following statistics are displayed only when the partition type is shared:
%entc
Indicates the percentage of the entitled capacity that is consumed. Because the time base over which this data is computed can vary, the entitled capacity percentage can sometimes exceed 100%. This excess is noticeable only with small sampling intervals.
lbusy
Indicates the percentage of logical processors utilization that occurred while you run at the user and system level.
app
Indicates the available physical processors in the shared pool.
phint
Indicates the number of phantom (targeted to another shared partition in this pool) interruptions received.
The following statistics are displayed only when the -h flag is specified:
%hypv
Indicates that the percentage of physical processor consumption spent making hypervisor calls.
hcalls
Indicates the average number of hypervisor calls that were started.
The following statistic is displayed only if the hardware can use the SPURR, and the processor is not running at nominal speed:
%nsp
Indicates the current average processor speed as a percentage of nominal speed.
The following statistic is displayed only if the turbo-mode accounting is disabled:
%utcyc
Indicates the total percentage of unaccounted turbo cycles.
The following statistics are displayed only when the -d flag is specified.
%utuser
Indicates the percentage of unaccounted turbo cycles in the user mode execution (application).
%utsys
Indicates the percentage of unaccounted turbo cycles in the kernel mode execution (kernel).
%utidle
Indicates the percentage of the unaccounted turbo cycles when the partition is idle and does not have any outstanding disk I/O requests.
%utwait
Indicates the percentage of the unaccounted turbo cycles when the partition is idle and has outstanding disk I/O requests.
If you specify the -m flag, the following metrics are displayed:
physb
Indicates that the physical processor is busy.
%entc
Indicates the percentage of the entitled capacity that is consumed. Because the time base over which this data is computed might vary, the entitled capacity percentage can sometimes exceed 100%. This excess is noticeable only with small sampling intervals.
vcsw
Indicates the number of virtual context switches that are virtual-processor hardware preemptions.
hpi
Indicates the number of hypervisor page-ins occurred.
hpit
Indicates the time that is spent waiting for hypervisor page-ins in milliseconds.
pmem
Indicates the physical memory that the hypervisor allocates to the LPAR in GB.
iomin
Indicates the minimum entitlement of the I/O memory pool in MB.
iomu
Indicates the I/O memory entitlement of the LPAR in use in MB.
iomf
Indicates the free I/O memory entitlement in MB.
iohwm
Indicates the high water mark of I/O memory entitlement usage in GB.
iomaf
Indicates the total number of times that the allocation requests for I/O memory entitlement pools that are failed since system startup.
If you specify the -e flag with the -m flag, the following information about I/O memory entitlement pools is displayed:
iompn
Indicates the name of the I/O memory entitlement pool in MB.
iomin
Indicates the minimum entitlement of the I/O memory pool in MB.
iodes
Indicates the wanted entitlement of the I/O memory pool in MB.
ioinu
Indicates the entitlement of the I/O memory pool in use in MB.
iores
Indicates the reserved entitlement of the I/O memory pool in MB.
iohwm
Indicates the high water mark of entitlement usage of the I/O memory pool in MB.
ioafl
Indicates the total number of times that an allocation request for this I/O memory entitlement pool that is failed since system startup.
The following statistics are displayed only when the -c flag is specified:
%xcpu
Indicates the percentage of utilization (relative to the overall CPU consumption by the logical partition) for the Active Memory Expansion (AME) activity.
xphysc
Indicates the number of physical processors that are used for the Active Memory Expansion activity.
dxm
Indicates the size of the expanded memory deficit for the LPAR in MB.
pgcol
Indicates the logical real memory pages of the calling partition in megabytes that are coalesced during the active memory share activity.
mpgcol
Indicates the number of megabytes of the memory pages that are called by the memory pool of the coalesced partition during the Active Memory sharing activity. If the partition is not authorized to access the pool-wide statistics, the metric shows zero.
ccol
Indicates the fraction of the CPU consumed in coalescing pages during the Active Memory sharing activity. If the partition is not authorized to access the pool-wide statistics, the metric shows zero.
Note: Coalescing of Memory page is a transparent operation. The hypervisor detects the duplicate pages, directs the user read pages to a single copy, and reclaims the other duplicate physical memory pages.

Flags

Table 2. Flags
Item Description
-c Adds the memory compression statistics of the LPAR to the default lparstat command output.
Note: This option is available only when an Active Memory Expansion is enabled.
-d Displays the detailed utilization statistics of the CPU. When you disable the accounting of the turbo-mode, the lparstat command shows the breakdown by category of the unaccounted turbo cycles. The breakdown is shown along with the dedicated, donating, or shared utilization columns such as %user, %sys, %idle, %wait, %entc, %idon, %bdon, %istol, and %bstol.
-e Displays information about the I/O memory entitlement pools of the LPAR. Specify the -e flag only with the –m flag. See the metrics that are displayed when you specify the -m flag.
-E Reports Scaled Processor Utilization Resource Register (SPURR) based utilization metrics if run on a SPURR-capable processor.
-G Resets the hypervisor statistics.
-h Adds summary hypervisor statistics to the default lparstat command output.
-H Provides information about the Hypervisor and displays the following Hypervisor statistics for each of the Hypervisor calls:
Statistic
Description
Number of calls
Number of Hypervisor call made.
Total Time Spent
The percentage of total time spent in this type of call.
Hypervisor Time Spent
The percentage of Hypervisor time spent in this type of call.
Average Call Time
The average call time for this type of call is in nano-seconds.
Maximum Call Time
The maximum call time for this type of call is in nano-seconds.
-i Provides details on the LPAR configuration. The -i option displays the following details:
Name
Description
Partition Name
Logical partition name as assigned at the HMC.
Partition Number
Number of this logical partition.
Power® Save Mode
Power saving mode of this logical partition.
Online Virtual CPUs
Number of CPUs (virtual engines) that are online.
Maximum Virtual CPUs
The maximum number of CPUs (virtual engines).
Online Memory
The amount of memory that is online.
Maximum Memory
The maximum amount of memory.
Type
Indicates whether the LPAR is using dedicated or shared CPU resource and if the SMT is turned on. The Type is displayed in the format [Shared | Dedicated] [-SMT] [ -# ]
The following list explains the different Type formats:
Shared
Indicates that the LPAR runs in the shared processor mode.
Dedicated
Indicates that the LPAR runs in the dedicated processor mode.
SMT[-#]
Indicates that the LPAR has an SMT mode that is turned on and the number of SMT threads is 2. The number of threads is displayed if the number of threads is greater than 2.
Mode
Displays whether the LPAR processor capacity is capped or uncapped allowing it to use idle cycles from the shared pool. A dedicated LPAR is capped or donating.
Entitled Capacity
The number of processing units this LPAR is entitled to receive.
Variable Capacity Weight
The priority weight that is assigned to this LPAR, which controls how extra (idle) capacity is allocated to it. A weight of -1 indicates that a soft cap is in place.
Minimum Capacity
l
The minimum number of processing units this LPAR was defined to ever have. Entitled capacity can be reduced down to this value.
Maximum Capacity
The maximum number of processing units this LPAR was defined to ever have. Entitled capacity can be increased up to this value.
Capacity Increment
The granule at which changes to Entitled Capacity can be made. A value in whole multiples indicates a Dedicated LPAR.
Maximum Physical CPUs in System
The maximum number of physical CPUs in the system that contains this LPAR.
  (Details displayed by the -i flag, are as follows):
Active Physical CPUs in System
The current number of active physical CPUs in the system that contains this LPAR.
Active CPUs in Pool
The maximum number of CPUs available to the shared processor pool of this LPAR.
Shared Physical CPUs in system
The number of physical CPUs available for use by shared processor LPARs.
Maximum Capacity of Pool
The maximum number of processing units available to the shared processor pool of this LPAR.
Entitled Capacity of Pool
The number of processing units that the shared processor pool of this LPAR is entitled to receive.
Unallocated Capacity
The sum of the number of processor units that are unallocated from shared LPARs in an LPAR group. This sum does not include the processor units unallocated from a dedicated LPAR, which can also belong to the group. The unallocated processor units can be allocated to any dedicated LPAR (if it is greater than or equal to 1.0) or shared LPAR of the group.
Physical CPU Percentage
Fractional representation relative to whole physical CPUs that these LPARs virtual CPUs equate to. A physical CPU Percentage is a function of Entitled Capacity or Online CPUs. Dedicated LPARs has 100% Physical CPU Percentage. A 4-way virtual with Entitled Capacity of 2 processor units has a 50% physical CPU Percentage.
Minimum Memory
The minimum memory that this LPAR is defined to ever have.
Minimum Virtual CPUs
The minimum number of virtual CPUs this LPAR was defined to ever have.
Unallocated Weight
Number of variable processor capacity weight units currently unallocated within the LPAR group.
Partition Group ID
LPAR group that this LPAR is a member of.
Shared Pool ID
Identifier of Shared Pool of Physical processors that this LPAR is a member.
  (Details displayed by the -i flag, are as follows):
Memory Mode
Displays whether the memory mode is shared or dedicated. If Active Memory Expansion is enabled, the memory mode also includes a new mode called Expanded.
Total I/O memory entitlement
The I/O memory entitlement of the LPAR.
Variable memory capacity weight
The variable memory capacity weight of the LPAR.
Memory Pool ID
The memory pool ID of the pool that the LPAR belongs to.
Physical Memory in the Pool
The physical memory that is present in the pool that the LPAR belongs to.
Hypervisor Page Size
The page size that the hypervisor uses for the page-in and page-out of LPAR logical-memory pages.
Unallocated Variable Memory Capacity Weight
The unallocated variable memory-capacity weight of the LPAR.
Unallocated I/O memory entitlement
The unallocated I/O memory entitlement of the LPAR.
Memory Group ID of LPAR
The memory group ID of the Workload Manager group that the LPAR belongs to.
Target Memory Expansion Factor
The target memory expansion factor that is configured for the LPAR.
Note: The target memory expansion factor is displayed when Active Memory Expansion is enabled.
Target Memory Expansion Size
The target expanded memory size for the LPAR. The target-expanded memory size is the true memory size that is multiplied by the target memory expansion factor.
Note: The target memory expansion size is displayed when Active Memory Expansion is enabled.
Power Save Mode
The power-saving mode for the LPAR.
Sub-processor Mode
The sub-processor mode for the LPAR.
start of changeResource Group IDend of change
start of changeThe resource group identifier.end of change
start of changeActive Physical CPUs in Resource Groupend of change
start of change The current number of active physical CPUs in the resource group.end of change

You can specify the -i flag alone or with the -P, -W, -s, and -N flags.

-L Displays whether the Live Partition Mobility (LPM) operation is disabled for the server. To determine whether LPM is disabled for the logical partition, consult the Hardware Management Console (HMC).
-m Displays the statistics that are related to the following aspects:
  • The logical memory
  • The physical memory that backs the logical memory of the LPAR
  • The I/O memory entitlement of the LPAR
  • The memory pool information on the pool that the LPAR belongs to
For more information about the metrics that are displayed when you specify the -m flag, see the metrics section.
-N Displays information about the EnergyScale modes of the system. You can specify only the -N flag or you can specify this flag along with the -i, -P, -W, and -s flags.
Note: The details that are listed when you run the lparstat -N command might change based on the hardware configuration of the system and new firmware level of the system.
-o Specifies the file name for the XML output.
-p Displays information about the page coalesce statistics of the LPAR. You can specify the -p flag only with the -m flag. When you run the lparstat command with the -w and -p flags, the result displays all the metrics that the -e flag displays in a single line.
-P Displays information about the tuning parameters of the energy management.

You can specify the -P flag alone or with the -i, -W, -s, and -N flags.

-r Resets the high water mark of I/O memory entitlement at the beginning of the command. You can use this flag only with the -m and -e flags.
-R Resets the high water mark at the beginning of each monitoring interval. If you specify both the -r and -R flags, the -R flag takes effect.
-s Displays LPAR information. The -s flag displays the following details:
Service partition ID
The service partition ID as assigned by the Hardware Management Console (HMC).
Number of configured LPARs
The number of LPARs that are configured on the HMC.

You can specify the -s flag alone or with the -P, -i, -W, and -N flags.

-t Displays the time in the HH:MM:SS format when the command is run with intervals.
-W Lists details of the workload partition (WPAR) configuration. If the command is run from the global environment, the WPAR Key value is 0. The -W flag displays the following details:
WPAR Key
WPAR static identifier.
WPAR Configured ID
WPAR dynamic identifier.
WPAR Maximum CPUs
Number of processors in a resource set. It displays the value of 0 if it is not restricted.
WPAR Effective CPUs
Number of processors in an effective resource set. It displays the value of 0 if it is not restricted.
WPAR CPU Percentage
WPAR processor-limit percentage.

You can specify the -W flag alone or with -P, -i, -s, and -N flags.

-x Lists the security mode settings for the LPAR.
-X Generates the XML output. The default file name is lparstat_DDMMYYHHMM.xml, unless the user specifies a different file name with the –o option.
-u Displays the expiration date of the AIX® Update Access Key (UAK) and the Firmware Update Access Key of the system, and the image date of the AIX operating system that is running.
Note: The app column is not displayed if Pool Utilization Authority (PUA) is not available.

Examples

  1. Enter the following command to get the default LPAR statistics:
    lparstat 1 1 
  2. Enter the following command to get default LPAR statistics with summary statistics on Hypervisor:
    lparstat -h 1 1
  3. Enter the following command to get the information about the partition:
    lparstat -i
  4. Enter the following command to get detailed Hypervisor statistics:
    lparstat -H 1 1
  5. Enter the following command to get statistics about the shared memory pool and the I/O memory entitlement of the partition:
    lparstat -m
  6. Enter the following command to get statistics about I/O memory pools inside the LPAR:
    lparstat -me
  7. The Type is in the following format if the LPAR runs in shared mode with 4 SMT threads:
    Type - Shared-SMT-4
  8. The Type is in the following format if the LPAR runs in dedicated mode with 2 SMT threads:
    Type - Dedicated-SMT
  9. Enter the following command to calculate the memory compression statistics in an LPAR when Active Memory Expansion is enabled:
    lparstat -c 1 1
  10. Enter the following command to get statistics about page coalescing inside an LPAR:
    lparstat -mp

Files

Item Description
/usr/bin/lparstat Contains the lparstat command.