Difference between revisions of "How to measure power consumption"

From ThinkWiki
Jump to: navigation, search
(wikilink)
(tp_smapi)
Line 1: Line 1:
 
To monitor the laptop's power consumption while it is running, unplug the AC power and run:
 
To monitor the laptop's power consumption while it is running, unplug the AC power and run:
# watch -n1 'cat /proc/acpi/battery/BAT0/*'
+
:{{cmdroot|watch -n1 'cat /proc/acpi/battery/BAT0/*'}}
  
This requires ACPI to be enabled. Note that running on battery power may activate power-saving mechanisms, so unless you take care to deactivate them this does not reflect power consumption under AC power.
+
This requires ACPI to be enabled. The value given is (roughly) an averge over the last minute.
 +
 
 +
Alternatively, load the [[tp_smapi]] module and run the following with AC power unplugged:
 +
:{{cmdroot|watch -n1 'cat /sys/devices/platform/smapi/BAT0/power_now'}}
 +
or
 +
:{{cmdroot|watch -n1 'cat /sys/devices/platform/smapi/BAT0/power_avg'}}
 +
 
 +
The former provides the instantaneous power draw, and the latter is (roughly) an average over the last minute.
 +
 
 +
Note that running on battery power may activate power-saving mechanisms, so unless you take care to deactivate them this does not reflect power consumption under AC power.
  
 
To measure power consumption while the laptop is suspended, use the [[ACPI sleep power drain test script]].
 
To measure power consumption while the laptop is suspended, use the [[ACPI sleep power drain test script]].
  
 
For reducing power consumption, see [[How to reduce power consumption]].
 
For reducing power consumption, see [[How to reduce power consumption]].

Revision as of 01:30, 11 May 2006

To monitor the laptop's power consumption while it is running, unplug the AC power and run:

# watch -n1 'cat /proc/acpi/battery/BAT0/*'

This requires ACPI to be enabled. The value given is (roughly) an averge over the last minute.

Alternatively, load the tp_smapi module and run the following with AC power unplugged:

# watch -n1 'cat /sys/devices/platform/smapi/BAT0/power_now'

or

# watch -n1 'cat /sys/devices/platform/smapi/BAT0/power_avg'

The former provides the instantaneous power draw, and the latter is (roughly) an average over the last minute.

Note that running on battery power may activate power-saving mechanisms, so unless you take care to deactivate them this does not reflect power consumption under AC power.

To measure power consumption while the laptop is suspended, use the ACPI sleep power drain test script.

For reducing power consumption, see How to reduce power consumption.