https://bugs.kde.org/show_bug.cgi?id=410902

            Bug ID: 410902
           Summary: Add per process power-related information in the
                    process table
           Product: ksysguard
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: general
          Assignee: ksysguard-b...@kde.org
          Reporter: carlon.l...@gmail.com
  Target Milestone: ---

Created attachment 122116
  --> https://bugs.kde.org/attachment.cgi?id=122116&action=edit
KSysGuard including per-process power consumption.

SUMMARY
When working on battery-powered devices, it would be very useful to have info
about power consumption related to each process (and maybe even application).
Other OS like Mac OS and Android provide such a feature in some form. I think
this is a feature that Plasma should include. Other energy-related info can be
provided in the future, but for the moment I'd start with this one.

IDEA
For the first step, a new column in the process table that reports some kind of
power requirement information for the process may be sufficient. An example is
provided in the shot I attached. The concept may then be extended with more
info/tools, charts, etc... if there is interest.

TECHNICAL PROPOSAL
My researches led me to a tool named Powertop
(https://github.com/fenrus75/powertop), which seems to be able to provide an
estimation in Watts of the power required by a process. The tool is a command
line binary based on ncurses that provides a process table with energy-related
information. Powertop is written by Intel and published under GPLv2 license. It
is reported to work on Linux and Android.
A possible approach would be to leverage the implementation contained in
Powertop and display in KSysGuard.

PROOF OF CONCEPT
To test the feasibility of my idea I implemented a proof of concept (the
attached shot results from it). I turned the Powertop executable into a shared
library (libpowertop) used as a data provider. Powertop requires root
privileges, so ksysguard uses libksysguard to get the process list, which in
turn uses KAuth to transparently run a helper linking to libpowertop. The
helper runs for the entire lifespan of the process list and provides data.
The shot I uploaded comes from my draft.

CONCLUSION
I'd appreciate feedback about both the feature itself and about my technical
proposal. There are clearly a few technical key points that would need in depth
discussion.

Thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to