Jeffrey Baker wrote: > On Tue, Dec 1, 2009 at 11:29 AM, Kok, Auke <[email protected]> wrote: >> nisha jain wrote: >>> Hi Auke, >>> >>> Thanks for the reply. My first objective is to display cpu-s power >>> consumption >>> in watts for each individual application running in the system. Is it >>> possible >>> to do so using powertop? I have only seen cpu states under directory created >>> inside the /sys/devices/system/cpu/cpu0 or cpu1/cpuidle path so i am not >>> sure >>> if it is for just idle state of the CPU. >> while technically possible, practically this is extremely hard: >> >> - CPU times of processes do not convert 1:1 into power consumption >> - you also need to know which hardware resources (memory, disk, audio, usb, >> bus, >> etc etc) that particular piece of software uses and how much power each of >> these >> components use for the particular task being executed. >> >> without a complete rewrite and much more technical information about every >> piece >> of hardware you can't do this (with powertop or not). > > Android attempts to do this. It can list total battery power > consumption by application. I don't know if perhaps they have > hardware support for this, or if they are fudging the numbers a bit, > but it might be instructive to study how they are doing it.
I'm not saying you couldn't make estimates (I can make them right now in powertop if I'd want to), but in order to make useful numbers you'd need to have hardware components that actually measure the power used per component. just having a battery measurement will not do. We do know CPU numbers pretty well, and with the scheduler numbers we could come up with some more accurate numbers, but it's still guessing. Auke _______________________________________________ Power mailing list [email protected] http://www.bughost.org/mailman/listinfo/power
