Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Maybe this question was made earlier but I can't find it. I want to see a terminal command or gui program that can show me the discharge rate of the battery. What hardware parts or programs are using more watts.

EDIT: Found additional information regarding my question when using for example PowerTop:

https://bbs.archlinux.org/viewtopic.php?id=128319

https://bugs.archlinux.org/task/26416

Both related to the having disable ACPI_PROCFS_POWER in the kernel.

share|improve this question
add comment

5 Answers

up vote 4 down vote accepted

You can try powerstat, which gives you the watts used over a period of 5 minutes. To install it, try the following commands:

sudo add-apt-repository ppa:colin-king/powermanagement
sudo apt-get update
sudo apt-get install powerstat

Or you can try the power-usage-report, which I guess, depends on fatrace and powertop.


Linked Question:

share|improve this answer
    
This indeed showed the Watt usage. I am hoping that powertop or the Gnome power window will have easier to read information on 12.04 about this. Very useful. Thank you jokerdino. –  Luis Alvarado Apr 21 '12 at 2:24
add comment

This may help

http://www.linuxpowertop.org/

enter image description here

share|improve this answer
    
But how are you getting the "Power Usage (ACPI estimate): 14.1W". I am only getting percentages and values I can't relate to watt usage. My version is 1.97 –  Luis Alvarado Apr 18 '12 at 17:25
    
Ok going out of my mind here. Haven't found an option to show me what you are showing me in that image. I would be awesome if I could directly see the power usage like that. Even better if I could output that, you know, as a variable for a program or something. –  Luis Alvarado Apr 18 '12 at 18:22
    
did you look at the link provided –  Ringtail Apr 18 '12 at 22:57
1  
Yeah which shows the same image as yours but there is nothing that says "Hey use this parameter or change this option in the config file to see the power usage". –  Luis Alvarado Apr 19 '12 at 0:21
    
lesswatts.org/projects/powertop/faq.php there are some kernel options listed that need to be enabled –  Ringtail Apr 19 '12 at 2:14
show 2 more comments

Maybe you're looking for "Rate" in Power Statistics > Laptop battery > Details?

Power Statistics screenshot

share|improve this answer
    
+1. Thank you WarriorIng64. Although in my case the rate always shows 0.0W. So I have never paid attention to it. But nevertheless very good point there. Going to see on 12.04 if it works correctly when it comes out. The laptop is an HP DV6000. –  Luis Alvarado Apr 21 '12 at 2:14
    
Forgot to add that I tested without the power cable ^^. –  Luis Alvarado Apr 21 '12 at 2:21
add comment

Type sudo powertop in the terminal.

share|improve this answer
    
Yes but I can not see anywhere something that tells me how much is been consumed. –  Luis Alvarado Apr 18 '12 at 17:26
add comment

You can see the current discharge rate of your battery without any additional tools. Open a terminal with Ctrl+Alt+T and enter this:

ls /proc/acpi

This gives you something like this:

BAT1

Now enter this command, substituting BAT1 if necessary:

cat /proc/acpi/battery/BAT1/state

You will get output similar to this:

present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      3395 mAh
present voltage:         12393 mV

The present rate line is what your looking for (my PSU is plugged in right now, so the discharge rate is zero).

If you want to see how the rate changes, e.g. per second, do this:

watch -n 1 cat /proc/acpi/battery/BAT1/state

This gives your the output from above, but refreshed every 1 second. Terminate with Ctrl+c.

share|improve this answer
    
Thank you nem75 but that was already tried and it was not showing the correct rate in my tests. Plugged or unplugged it would say the same 0 mA. The one that jokerdino mentioned worked. Anyway I also did a full 16 hour recalibration to be 100% sure and it fixed the problem for the way you are mentioning here (which is the one I use) and every other way mentioned here. –  Luis Alvarado Apr 25 '12 at 18:34
    
Ah, good to know. Guess I only tried it on calibrated systems. :) –  nem75 Apr 26 '12 at 7:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.