Monday, August 24, 2009

Know your Battery status the command line way

Well no big deal:-). The battery information can be easily got by clicking on the battery icon in your Ubuntu's taskbar. The good thing here is you will know from which file the information of the battery is fetched.
To know the current state of the battery:
pradeep@pradeep-laptop:~$ cat /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: charging
present rate: 0 mA
remaining capacity: 3599 mAh
present voltage: 12578 mV

To know all the info regarding your laptop battery:
pradeep@pradeep-laptop:~$ cat /proc/acpi/battery/BAT0/info
present: yes
design capacity: 4400 mAh
last full capacity: 3789 mAh
battery technology: rechargeable
design voltage: 10800 mV
design capacity warning: 185 mAh
design capacity low: 129 mAh
capacity granularity 1: 56 mAh
capacity granularity 2: 3604 mAh
model number: VE06047
serial number: 453
battery type: LION
OEM info: STL-LG22


Ahh, 3789mAh/4400mAh = 87%, Not bad after 1.5 years of torture to my lappy;-). Let me know your' s too.

1 comments:

Mehar said...

Hello Friend,  Hope everything is fine.
I am a researcher from psychology department. Interested in bloggers and their behavior. My  research topic is "Blogging Improves Self-Identity".  In connection with my research I need your help.  If you spare your mail id, I will be sending  the research questionnaire's to your mail Id.   You can give your responses to the questionnaire. My mail Id is meharun@gmail.com. Kindly cooperate in this survey. Your response will be used only for research purpose.  To end with friendly note, I am always ready to help you if you have any queries or doubts related to psychology. Thank you.
 
Meharunnisha
Doctoral Candidate
Dept of Psychology
Bharathiar University
Coimbatore - 641046
Tamil Nadu, India
meharun@gmail.com

01/09/09