2.6. DeviceKit-power and devkit-power
In Red Hat Enterprise Linux 6 DeviceKit-power assumes the power management functions that were part of HAL and some of the functions that were part of GNOME Power Manager in previous releases of Red Hat Enterprise Linux (refer also to Section 2.7, “GNOME Power Manager”). DeviceKit-power provides a daemon, an API, and a set of command-line tools. Each power source on the system is represented as a device, whether it is a physical device or not. For example, a laptop battery and an AC power source are both represented as devices.
You can access the command-line tools with the
devkit-power
command and the following options:
--enumerate
,-e
- displays an object path for each power devices on the system.
Example 2.6. Sample Output of Object Paths
devkit-power -e
$ /org/freedesktop/DeviceKit/power/devices/line_power_AC
$ /org/freedesktop/UPower/DeviceKit/power/battery_BAT0
--dump
,-d
- displays the parameters for all power devices on the system.
--wakeups
,-w
- displays the CPU wakeups on the system.
--monitor
,-m
- monitors the system for changes to power devices, for example, the connection or disconnection of a source of AC power, or the depletion of a battery. Press Ctrl+C to stop monitoring the system.
--monitor-detail
- monitors the system for changes to power devices, for example, the connection or disconnection of a source of AC power, or the depletion of a battery. The
--monitor-detail
option presents more detail than the--monitor
option. Press Ctrl+C to stop monitoring the system. --show-info object_path
,-i object_path
- displays all information available for a particular object path.
Example 2.7. Using the -i option
To obtain information about a battery on your system represented by the object path/org/freedesktop/UPower/DeviceKit/power/battery_BAT0
, run:devkit-power -i /org/freedesktop/UPower/DeviceKit/power/battery_BAT0