nisha jain wrote: > Hi All, > > I am working on research related to Power management and control for single > and > multiprocessors. I have come across the PowerTop application and found that is > shows all information about the CPU c & p states and thermal states but while > going through the old mailing list i found one mail saying that it is only > good > for showing the power consumption while CPU is in idle state. I want to get > all > CPU power information for different applications and kernel processes running > into system (with load). I have also gone through the PowerTop application > code > and found it is reading from the various kernel files all the information. As > per my understaning this information is written by the ACPI HW/SW module. > Previously, I read through ACPI specification but not sure how to call those > APIs and after going through PowerTop Application i found my understanding was > wrong as the ACPI is already part of most Linux kernels and so the application > simply should read the power state related information from kernel files. I am > not able to figure out few things in the code, also not sure if my approach is > correct and i can enhance PowerTop application to achieve my goal, i guess > people who have developed the application can give me some idea if i can > enhance the app and it would be a great help...
powertop uses the kernel APIs. perhaps you should dive in the kernel documentation (in the Documentation folder in any linux kernel source tree), and the various CPU information APIs in the kernel on how to interface to them. as for measuring power when the system is busy: powertop measures (P and C states, amongst others) correctly regardless whether the system is busy or idle, it's just that the data it reports on busy (loaded) systems is less useful for interpretation, but you can certainly use and rely on the C and P state information reported by powertop. It all depends on the objective of your investigation. Auke _______________________________________________ Power mailing list [email protected] http://www.bughost.org/mailman/listinfo/power
