Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am willing to calculate the power usage of my laptop during, for example, 5 minutes (short lapse of time).
Then I change something in my system (like I turn off network interfaces, etc)
and redo this calculation, in order to see the differences.
So far I found out gnome-power-statistics and powertop which both do not what I want.
Is there a software that show the amount of energy used in a certain interval of time?
I do not know what other applications are out there but it would be easy to create a script to calculate whatever you want. The values are located in the file /proc/acpi/battery/BAT0/state (BAT0 directory name depends on distribution). The value you are looking for is present state (current) and present voltage.
Power watts = (present state X Present voltage)/1000
I do not know what other applications are out there but it would be easy to create a script to calculate whatever you want. The values are located in the file /proc/acpi/battery/BAT0/state (BAT0 directory name depends on distribution). The value you are looking for is present state (current) and present voltage.
Power watts = (present state X Present voltage)/1000
That is wonderful. It is the simplest solution!
However there is a little problem. I get an 'unknown' value on present voltage.
Is it meaningful to use only the present state as an indicator?
You'd be better off with a kill-a-watt meter. The one I have has a time monitor. I can monitor for a few minutes to years.
Any OS based will not be very accurate.
Thank you, but I don't need something too accurate for what I want to do.
As long as I can get a significant difference of power usage when I, for example, turn off a network interface, or something like that.
Since you've been so helpful I want to ask you this other question.
I noticed that there is no decrease in the present rate when I switch off a network interface.
A little background:
I am using an experimental protocol (MPTCP) to use all network interfaces simultaneously in a TCP connection.
If I download a file with both interfaces on (eth0 and wlan0), every interface receive at 400 KB/s. The total bandwidth achieved is about 800 KB/s.
If I switch off, let's say, wlan0, I get all traffic on eth0 (800 KB/s).
The problem is that there is no decrease in the power consumption.
Is that because the interface that stays on receive double the traffic than before? Or is it because, as jefro said, this OS based method is not accurate?
How is this possible that there is no decrease in power usage?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.