Show Table of Contents
2.6. UPower
Red Hat Enterprise Linux 6 中的 DeviceKit-power 假设电源管理功能是 HAL 的一部分。在先前发行的 Red Hat Enterprise Linux 中 ,其中一些功能是 GNOME 电源管理器 的一部分(请参阅〈第 2.7 节 “GNOME 电源管理器”〉)。Red Hat Enterprise Linux 7 和 DeviceKit-power 是根据 UPower 重新命名的。UPower 提供了守护程序、 API 和一组命令行工具。系统上每个电量源都代表了一个设备,不论它是不是物理设备。例如,一个笔记本电池和 AC 电源都代表了设备。
若要使用命令行工具,您可以使用
upower 命令和以下选项:
--enumerate,-e- 显示系统中每个电源设备的对象路径,例如:
/org/freedesktop/UPower/devices/line_power_AC/org/freedesktop/UPower/devices/battery_BAT0 --dump,-d- 显示系统中所有电源设备的参数。
--wakeups,-w- 显示系统中的 CPU 唤醒。
--monitor,-m- 监视系统电源更换,例如:连接或者断开交流电源,或者电池耗尽。如需停止监视系统,请按 Ctrl+C 键。
--monitor-detail- 监视系统电源更换,例如:连接或者断开交流电源,或者电池耗尽。
--monitor-detail选项会显示比--monitor选项更详细的情况。如需停止监视系统,请按 Ctrl+C 键。 --show-info object_path,-i object_path- 显示特定对象路径中所有可用的信息。例如,若要获得
/org/freedesktop/UPower/devices/battery_BAT0对象路径中所代表的关于系统电池的信息,请运行:upower -i /org/freedesktop/UPower/devices/battery_BAT0

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.