# Power manipulation

The power settings and usage of to the server can be inspected using these methods. It is also possible to power the server on and off via the iLO, and to boot documentation.

class hpilo.Ilo
  press_pwr_btn()

    Press the power button

  hold_pwr_btn(toggle=None)

    Press and hold the power button

  get_host_power_status()

    Whether the server is powered on or not

        >>> ilo.get_host_power_status()
        ON

  get_host_power_reg_info()

    Get power regulator information

  set_host_power(host_power=True)

    Turn host power on or off

  get_server_auto_pwr()

    Get the automatic power on delay setting

        >>> ilo.get_server_auto_pwr()
        ON

  set_server_auto_pwr(setting)

    Set the automatic power on delay setting. Valid settings are False, True (for minumum delay), 15, 30, 45 60 (for that amount of delay) or random (for a random delay of up to 60 seconds.)

  get_critical_temp_remain_off()

    Get whether the server will remain powered off after a critical temperature shutdown

        >>> ilo.get_critical_temp_remain_off()
        {'critical_temp_remain_off': 'No'}

  set_critical_temp_remain_off(value)

    Set whether the server will remain off after a critical temperature shutdown

  get_power_readings()

    Get current, min, max and average power readings

        >>> ilo.get_power_readings()
        {'average_power_reading': (65, 'Watts'),
         'maximum_power_reading': (101, 'Watts'),
         'minimum_power_reading': (65, 'Watts'),
         'present_power_reading': (67, 'Watts')}

  get_server_power_on_time()

    How many minutes ago has the server been powered on

        >>> ilo.get_server_power_on_time()
        >>> pprint(my_ilo.get_server_power_on_time())
        185813

  clear_server_power_on_time()

    Clears the server power on time

  get_host_power_saver_status()

    Get the configuration of the ProLiant power regulator

        >>> ilo.get_host_power_saver_status()
        {'host_power_saver': 'AUTO'}

  set_host_power_saver(host_power_saver)

    Set the configuration of the ProLiant power regulator

  get_power_cap()

    Get the power cap setting

        >>> ilo.get_power_cap()
        OFF

  set_power_cap(power_cap)

    Set the power cap feature to a specific value

  get_host_pwr_micro_ver()

    Get the version of the power micro firmware

        >>> ilo.get_host_pwr_micro_ver()
        3.3

  get_pwreg()

    Get the power and power alert threshold settings

        >>> ilo.get_pwreg()
        {'efficiency_mode': 3,
         'get_host_power': {'host_power': 'ON'},
         'pcap': {'mode': 'OFF'},
         'pwralert': {'duration': 0, 'threshold': 0, 'type': 'DISABLED'}}

  set_pwreg(type, threshold=None, duration=None)

    Set the power alert threshold