Re: Power Measurement Problem: Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 11, 2008 at 03:33:14PM +0200, Cihan Kömeçoğlu wrote:
> I would like to measure the fine-grained consumed power
> per wireless transaction on a loptop. I am sure that
> the most fine-grained measurement would be physically wiring the
> laptop battery with a voltmeter. However, this is inconvenient for me.
> Thus, I installed acpi in order to measure the power consumed by the
> wireless interface of my laptop. However, my understanding is that
> acpi periodically flushes the power measurements into a state file.

ACPI will not do that. If you have a userland daemon to do that, this
should be possible. See for example how the powertop utility uses ACPI
to measure power consumption (usually only works when the laptop runs
on battery).

Note: ACPI power consumption is only an *estimate* of the overall power
consumption, not power consumption of individual devices! The best way
to measure power consumption is indeed to use a watt meter.

> Is it possible to tell the acpi to flush its power state into the
> state file whenever a wireless transaction is performed. If not,
> is there a tool that can be used to get the power state of the
> battery?

I don't think you can. The kernel tells a (wireless) network device
that there is data available to send. The network device will put that
on the wire (air) as soon as it think is convenient. There is no
callback when the network device starts sending, only when it has
completed sending (usually through an IRQ). Even if you get that
callback, you're already to late to measure.

It gets even worse when the network device receives a packets: in a
busy wireless network most packets are discarded in the ESSID and MAC
filters before they even reach the part that can actually acknowledge
the kernel something happened (ok, you could enable promiscuous mode)
yet it still costs energy to process the incoming packet. If the
packet is indeed for your computer, you only get an IRQ after it was
received completely, not when receiving starts so you are still to late
to measure.

I think you can do two things:
1) Measure the actually power of the wireless device by wiring it with
   a voltage and current meter.
2) Use ACPI to get an estimate of the overall power consumption while
   using the wireless interace and subtracting that with an estimate
   while the laptop is idle.


Erik

-- 
Erik Mouw -- mouw@xxxxxxxxxxxx

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux