wlmstat Command

Purpose

Shows Workload Manager (WLM) per class resource utilization statistics.

Syntax

wlmstat [-l Class | -t Tier] [-S | -s] [-@] [-c ] [-m] [-b] [-B Device] [-T] [-a] [-w] [-v] [Interval] [Count]

wlmstat [-l Class | -t Tier] [-@] [-c] [-m] [-b] [-u] [Interval] [Count]

wlmstat [-l Class | -t Tier] [-@] [-M] [-S | -s] [-w] [-v] [Interval] [Count]

Description

The wlmstat command symbolically displays the contents of WLM data structures retrieved from the kernel. If a Count is specified, wlmstat loops Count times and sleeps Interval seconds after each block is displayed. If Interval and Count are not specified, one output report is produced. If Interval is specified but no Count is given, wlmstat outputs results continuously at the given interval until stopped by a signal (SIGINTR, SIGQUIT, and SIGKILL). By default, wlmstat displays the statistics for all the resources for every superclass and subclass. You can specify flags to narrow the focus of the statistics to a type of resource, tier, superclass, or subclass and alter the output format.

Note: The following should be considered when viewing the wlmstat output:
  1. Starting with AIX® 5.3, the WLM processor usage values and process priority adjustments are updated 10 times per second by default.
  2. The value displayed for processor usage is not the current instantaneous usage from the last second, but is instead an average of the last N readings (starting with AIX 5.3, the default value for N is 15).
  3. The Unmanaged class is used to report system interrupt time and for tracking memory usage for all of the pinned pages in the system that are not managed by the WLM. No processes are assigned to this class.

It is possible for a process with a hard limit of 50 percent to use more than 50 percent of the processor between two consecutive WLM usage updates. Each tenth of a second, every process is assigned a priority, and the scheduler then schedules all processes based on their assigned priorities. A process might receive more of the processor resources than the process hard limit between WLM updates.

By default, each instantaneous value of processor usage from each update is kept for the following 15 readings and is averaged with the other 14 readings before being displayed by wlmstat. This can potentially result in a value of greater than 50 percent due to a single instance of more than 50 percent usage between WLM updates.

The priority of a process will be greatly reduced and the process will be unable to run if the process consistently reaches or exceeds its hard limit. Over the long term, the resource utilization of the process must be at or under the process hard maximum. Over a short time interval, wlmstat may show the process using more than the process hard limit. The /usr/samples/kernel/wlmtune command that is available in the bos.adt.samples PTF can be used to modify the behavior of WLM in such an instance. The related tunables are:

schedhz
The frequency at which the WLM scheduler recalculates class consumption and priority for processor. The default is 10. Modifying this value changes the responsiveness of WLM. Increasing this value causes WLM to update more frequently, thereby reducing the possibility of a process exceeding its hard limit during a short time interval. The trade-off for this is increased overhead, since more WLM processing occurs. This can potentially affect overall system performance.
cpuhist
The number of consecutive processor consumption values used in the average calculation. The default is 15. Increasing this value further smooths the reported processor usage values by averaging over a longer period.

To make WLM more responsive so that classes do not exceed their maximums over long periods, it is recommended that you first try modifying schedhz until the wlmstat output displays the desired results. You may want to also modify cpuhist so that wlmstat averages over the same time interval. For example, if schedhz is 20 and cpuhist is 15, wlmstat will average over a period of 0.75 seconds (15/20), so you may want to change cpuhist to 30 so that wlmstat still averages over 1.5 seconds.

On systems with no contention for processor, an Interval of 5 for wlmstat is recommended in order to adhere to WLM limits.

Flags

Item Description
-@ Displays workload partition resource information.
-a Displays subclass consumption in absolute terms. By default, the subclass consumption percentages are shown relative to the superclass consumption. With this option, subclass consumption is displayed relative to the total amount of resource available on the system (as is done for superclasses). All values are displayed with 1% precision. For instance, if a superclass has a processor target of 20% and the processor percentage shown by wlmstat without -a for a subclass is 10%, wlmstat with -a shows the processor percentage for the subclass as 2%.
-b Displays only disk I/O statistics.
-B Device Displays disk I/O device statistics. Passing an empty string (-B "") displays the statistics for all the disks accessed by the class.
-c Shows only processor statistics.
-l Class Displays statistics for Class name. If not specified, all classes display along with a summary for appropriate fields.
-m Shows only physical memory statistics.
-M Displays the Real/Virtual Memory statistics. Use of the -M option adds the following columns in the output:
RMSIZ
Utilized real memory size for the class
VMSIZ
Utilized virtual memory size for the class
RMLIM
Real memory limit for the class
VMLIM
Virtual memory limit for the class
LGPGSIZ
Utilized large pages in the class
LGPGLIM
Large page limit for the class
Note: A - will be displayed for the RMLIM, VMLIM, and LGPGLIM fields if the limit is undefined. When the -M and -w options are used together, RMSIZ and VMSIZ fields contain the high watermarks for these attributes instead of the actual utilized values. In addition, the LGPGSIZ and LGPGLIM fields is turned off.
-s Displays only subclass statistics.
-S Displays only superclasses statistics.
-t Tier Displays statistics only for the specified Tier.
-T Displays the total numbers for resource utilization since WLM was started or the class was created, whichever is the latter. The units are:
CPU
The total processor time, in milliseconds, consumed by a class
MEM
Unused
DKIO
The total number of 512 byte blocks sent/received by a class for all the disk devices accessed.
-v Specifies verbose mode. This flag, intended for trouble shooting, also displays some class attributes, resource shares and limits and other WLM parameters, including internal parameter values intended for AIX support personnel. The following information can be of interest for users:
Column Header
Description
CLASS
Class name.
tr
tier number (0 to 9)
i
Value of the inheritance attribute: 0 = no, 1 = yes.
#pr
Number of processes in the class. If a class has no (0) process assigned to it, the values shown in the other columns might not be significant.
CPU
Processor utilization of the class (%).
MEM
Physical memory utilization of the class (%).
DKIO
Disk IO bandwidth utilization for the classs (%).
sha
Number of shares ('-' is represented as -1)
min
Resource minimum limit (%)
smx
Resource soft maximum limit (%)
hmx
Resource hard maximum limit (%)
des
(desired): percentage goal (target) calculated by WLM using the shares numbers (%)
npg
Number of memory pages owned by the class.

The other columns are for internal use only and bear no meaning for administrators and end users. This format is better used with a resource selector (-c, -m, or -b), otherwise the lines might be too long to fit into a line of a display terminal.

-w Displays the memory high water mark, that is the maximum number of pages that a class had in memory at any given time since WLM was started or the class was created (whichever happened last).
-u Displays per-tier and total unused resources.

Display

Results are tabulated, with the following fields:

Name Class name
CPU Percentage of total processor time consumed by the class.
MEM Percentage of physical memory consumed by the class.
DKIO Percentage of the disk IO bandwidth consumed by the class. This number is the average of the disk bandwidth on all the disk devices accessed by the class, and is usually not significant. For instance if a class consumes 80% of the bandwidth of one disk and 5% of the bandwidth of two other disks, the DKIO column shows 30%. For details on the per device utilization, use the -B device option.

Examples

  1. To get a printout of WLM activity right now, enter:
    wlmstat

    This produces the following output:

                      CLASS CPU MEM DKIO 
               Unclassified   0   0   0 
                  Unmanaged   0   0   0 
                    Default   0   0   0 
                     Shared   0   0   0 
                     System   0   0   0 
                     class1  12   0   0 
           class1.Default     4   0   0 
            class1.Shared     0   0   0 
         class1.subclass1     4   0   0 
         class1.subclass2     4   0   0 
                     class2  12   0   0 
           class2.Default     4   0   0 
            class2.Shared     0   0   0 
         class2.subclass1     4   0   0 
         class2.subclass2     4   0   0 
                
        
  2. To get a report for superclass class1, enter:
    wlmstat -l class1
    This produces the following output:
           
    
                      CLASS CPU MEM DKIO
    
                     class1  12   0   0 
           class1.Default     4   0   0 
            class1.Shared     0   0   0 
         class1.subclass1     4   0   0 
         class1.subclass2     4   0   0 
           
  3. To get a report for subclass sclass1.subclass2 updated every 10 seconds, for one minute, enter:
         wlmstat -l class1.subclass2 10 6
    This produces the following output:
                      CLASS CPU MEM DKIO 
         class1.subclass2     4   0   0 
         class1.subclass2     4   0   0 
         class1.subclass2     4   0   0 
         class1.subclass2     4   0   0 
         class1.subclass2     4   0   0 
         class1.subclass2     4   0   0 
  4. To display virtual/real memory statistics, enter:
    wlmstat -M
    This produces the following output:
    CLASS          RMSIZ    RMLIM   VMSIZ    VMLIM  LGPGSIZ LGPGLIM 
    Unmanaged       1024      4096   4096     8192     0       - 
    Default         0           -      0       -       0       - 
    Shared          0           -      0       -       0       - 
    System          23567    50000  819234   1000000   0       - 
  5. To display the memory high water mark, enter:
    wlmstat -M -w
    This produces the following output:
    CLASS      RMSIZ RMLIM  VMSIZ   VMLIM
    Unmanaged  1024  4096   4096    8192
    Default    0     -      0       -
    Shared     0     -      0       -
    System     23567 50000  819234  1000000

Errors

A warning message is issued by wlmstat if WLM is not started.