How do I find out out details about my Linux Laptops temperature, battery status and other information from command prompt?
The information regarding your battery status and acpi is stored in /proc and /sys file system. The easiest way to read this information is using acpi command as follows (note acpi may not be installed by default so use apt-get or yum command to install the same):
$ acpi -V
Sample outputs:
Battery 0: Full, 100% Battery 0: design capacity 8400 mAh, last full capacity 8044 mAh = 95% Adapter 0: on-line Thermal 0: ok, 53.5 degrees C Thermal 0: trip point 0 switches to mode critical at temperature 107.0 degrees C Cooling 0: LCD 0 of 15 Cooling 1: Processor 0 of 10 Cooling 2: Processor 0 of 10 Cooling 3: Processor 0 of 10 Cooling 4: Processor 0 of 10 Cooling 5: Processor 0 of 10 Cooling 6: Processor 0 of 10 Cooling 7: Processor 0 of 10
You can browse the same data by visiting /proc/acpi/ directory:
$ cd /proc/acpi/
$ ls -l
Sample outputs:
dr-xr-xr-x 3 root root 0 2010-07-07 14:29 ac_adapter dr-xr-xr-x 3 root root 0 2010-07-07 14:29 battery dr-xr-xr-x 5 root root 0 2010-07-07 14:29 button -r-------- 1 root root 0 2010-07-07 14:29 dsdt dr-xr-xr-x 3 root root 0 2010-07-07 14:29 embedded_controller -r-------- 1 root root 0 2010-07-07 13:14 event -r-------- 1 root root 0 2010-07-07 14:29 fadt dr-xr-xr-x 2 root root 0 2010-07-07 14:29 fan -r--r--r-- 1 root root 0 2010-07-07 14:29 info dr-xr-xr-x 2 root root 0 2010-07-07 14:29 power_resource dr-xr-xr-x 10 root root 0 2010-07-07 14:29 processor -rw-r--r-- 1 root root 0 2010-07-07 14:29 sleep dr-xr-xr-x 3 root root 0 2010-07-07 14:29 thermal_zone dr-xr-xr-x 3 root root 0 2010-07-07 13:14 video -rw-r--r-- 1 root root 0 2010-07-07 14:29 wakeup
OR
$ cat /proc/acpi/thermal_zone/THM/temperature
Sample outputs:
temperature: 55 C
GUI Tool
gnome-power-statistics is the gui program for the gnome power management infrastructure. It allows users to visualize the power consumption of laptop hardware. Type the following command to view stats or click on GUI power icon located on right side:
$ gnome-power-statistics
Sample outputs:
How Do I Get CPU Temperature Data?
- See our FAQ: Linux Read CPU Temperature Sensor Chip Data
How Do I Read Hard Disk Temperature?
- See our Tip: Linux: Monitor hard disks temperature with hddtemp
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop














{ 4 comments… read them below or add one }
how do i know the remaining battery in hours
rambo:
when your power adapter off
you will have some thing like that
———————————————————-
root@null:/home/null# acpi -V
Battery 0: Discharging, 93%, 03:27:15 remaining
Battery 0: design capacity 2251 mAh, last full capacity 2251 mAh = 100%
Adapter 0: off-line
———————————————————
this will show you the remaining by hour .
the example in this tutorials show it as power adapter on.
thank you
another command “ibam”
Thanks, the information is much appreciated.