Viewing Power-Consumption Data

The Power Management (PM) Observability Module and the ldmpower command enable you to view CPU thread power-consumption data for your domains.

The PM Observability Module is enabled by default because the ldmd/pm_observability_enabled Service Management Facility (SMF) property is set to true. See the ldmd(8) man page.

The ldmpower command has the following options and operands with which you can customize the power-consumption reporting data:

ldmpower [-ehiprstvx | -o hours | -m minutes] | -c resource [-l domain-name[,domain-name[,...]]]
[interval [count]]

For information about the options, see the ldmpower(8) man page.

To run this command as a non-privileged user, you must be assigned the LDoms Power Mgmt Observability rights profile. If you already have been assigned the LDoms Management or LDoms Review rights profile, you automatically have permission to run the ldmpower command.

For information about how Oracle VM Server for SPARC uses rights, see Logical Domains Manager Profile Contents.

These rights profiles can be assigned directly to users or to a role that is then assigned to users. When one of these profiles is assigned directly to a user, you must use the pfexec command or a profile shell, such as pfbash or pfksh, to successfully use the ldmpower command to view CPU thread power-consumption data. See Delegating the Management of Logical Domains by Using Rights.

The following examples show how to enable the PM Observability Module and show ways in which to gather power-consumption data for the CPUs that are assigned to your domains.

Example A-1 Enabling the Power Management Observability Module

The following command enables the PM Observability Module by setting the ldmd/pm_observability_enabled property to true if the property is currently set to false.

# svccfg -s ldmd setprop ldmd/pm_observability_enabled=true
# svcadm refresh ldmd
# svcadm restart ldmd

Example A-2 Using a Profile Shell to Obtain CPU Thread Power-Consumption Data by Using Roles and Rights Profiles

  • The following example shows how to create the ldmpower role with the LDoms Power Mgmt Observability rights profile, which permits you to run the ldmpower command.

    primary# roleadd -P "LDoms Power Mgmt Observability" ldmpower
    primary# passwd ldmpower
    New Password:
    Re-enter new Password:
    passwd: password successfully changed for ldmpower

    This command assigns the ldmpower role to the sam user.

    primary# usermod -R ldmpower sam

    User sam assumes the ldmpower role and can use the ldmpower command. For example:

    $ id
    uid=700299(sam) gid=1(other)
    $ su ldmpower
    Password:
    $ pfexec ldmpower
    Processor Power Consumption in Watts
    DOMAIN  15_SEC_AVG  30_SEC_AVG  60_SEC_AVG
    primary 75          84          86
    gdom1   47          24          19
    gdom2   10          24          26
  • The following example shows how to use rights profiles to run the ldmpower command.

    Assign the rights profile to a user.

    primary# usermod -P +"LDoms Power Mgmt Observability" sam

    The following commands show how to verify that the user is sam and that the All, Basic Solaris User, and LDoms Power Mgmt Observability rights profiles are in effect.

    $ id
    uid=702048(sam) gid=1(other)
    $ profiles
    All
    Basic Solaris User
    LDoms Power Mgmt Observability
    $ pfexec ldmpower
    Processor Power Consumption in Watts
    DOMAIN  15_SEC_AVG  30_SEC_AVG  60_SEC_AVG
    primary 75          84          86
    gdom1   47          24          19
    gdom2   10          24          26

Example A-3 Viewing Processor Power-Consumption Data

The following examples show how to use the ldmpower to report processor power-consumption data for your domains.

  • The following command shows the 15-second, 30-second, and 60-second rolling average processor power-consumption data for all domains:

    primary# ldmpower
    Processor Power Consumption in Watts
    DOMAIN  15_SEC_AVG  30_SEC_AVG  60_SEC_AVG
    primary 75          84          86
    gdom1   47          24          19
    gdom2   10          24          26
  • The following command shows extrapolated power-consumption data for all the domains: primary, gdom1, and gdom2.

    primary# ldmpower -x
    System Power Consumption in Watts
    DOMAIN  15_SEC_AVG  30_SEC_AVG  60_SEC_AVG
    primary 585/57.47%  701/68.96%  712/70.22%
    gdom1   132/12.97%  94/9.31%    94/9.30%
    gdom2   298/29.27%  218/21.47%  205/20.22%
  • The following command shows the instantaneous processor power-consumption data for the gdom2 and gdom5 domains. It reports the data every ten seconds for five times.

    primary# ldmpower -itl gdom2,gdom5 10 5
    Processor Power Consumption in Watts
    DOMAIN          TIMESTAMP               INSTANT
    gdom2           2013.05.17 11:14:45     13
    gdom5           2013.05.17 11:14:45     24
    
    gdom2           2013.05.17 11:14:55     18
    gdom5           2013.05.17 11:14:55     26
    
    gdom2           2013.05.17 11:15:05     9
    gdom5           2013.05.17 11:15:05     16
    
    gdom2           2013.05.17 11:15:15     15
    gdom5           2013.05.17 11:15:15     19
    
    gdom2           2013.05.17 11:15:25     12
    gdom5           2013.05.17 11:15:25     18
  • The following command shows the average power-consumption data for the last 12 hours for all domains. Data is shown at one-hour intervals starting from the last requested hourly calculation.

    primary# ldmpower -eto 12
    Per domain MINIMUM and MAXIMUM power consumption ever recorded:
    primary         2013.05.17 08:53:06     3                Min Processors
    primary         2013.05.17 08:40:44     273              Max Processors
    gdom1           2013.05.17 09:56:35     2                Min Processors
    gdom1           2013.05.17 08:53:06     134              Max Processors
    gdom2           2013.05.17 10:31:55     2                Min Processors
    gdom2           2013.05.17 08:56:35     139              Max Processors
    
    primary         2013.05.17 08:53:06     99               Min Memory
    primary         2013.05.17 08:40:44     182              Max Memory
    gdom1           2013.05.17 09:56:35     13               Min Memory
    gdom1           2013.05.17 08:53:06     20               Max Memory
    gdom2           2013.05.17 10:31:55     65               Min Memory
    gdom2           2013.05.17 08:56:35     66               Max Memory
    
    Processor Power Consumption in Watts
    12 hour's worth of data starting from 2013.05.16 23:17:02
    DOMAIN          TIMESTAMP               1 HOUR AVG
    primary         2013.05.17 09:37:35     112
    gdom1           2013.05.17 09:37:35     15
    gdom2           2013.05.17 09:37:35     26
    
    primary         2013.05.17 10:37:35     96
    gdom1           2013.05.17 10:37:35     12
    gdom2           2013.05.17 10:37:35     21
    
    primary         2013.05.17 11:37:35     85
    gdom1           2013.05.17 11:37:35     11
    gdom2           2013.05.17 11:37:35     23
    ...