Difference between revisions of "CentOS 7.x check laptop battery information"

From Notes_Wiki
(Created page with "<yambe:breadcrumb>CentOS_7.x_laptop_battery|CentOS 7.x laptop battery</yambe:breadcrumb> =CentOS 7.x check laptop battery information= To check laptop battery related informa...")
 
m
 
Line 1: Line 1:
<yambe:breadcrumb>CentOS_7.x_laptop_battery|CentOS 7.x laptop battery</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x monitoring|Monitoring]] > [[CentOS 7.x laptop battery|Laptop battery]] > [[CentOS 7.x check laptop battery information]]
=CentOS 7.x check laptop battery information=


To check laptop battery related information use:
To check laptop battery related information use:
Line 26: Line 25:
Refer:
Refer:
* https://askubuntu.com/questions/69556/how-to-check-battery-status-using-terminal
* https://askubuntu.com/questions/69556/how-to-check-battery-status-using-terminal
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x monitoring|Monitoring]] > [[CentOS 7.x laptop battery|Laptop battery]] > [[CentOS 7.x check laptop battery information]]

Latest revision as of 15:40, 28 August 2022

Home > CentOS > CentOS 7.x > Monitoring > Laptop battery > CentOS 7.x check laptop battery information

To check laptop battery related information use:

      upower -i /org/freedesktop/UPower/devices/battery_BAT0      


To get laptop battery information via alias create '/etc/profile.d/bat.sh' with

      #!/bin/bash

      alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"'

Then use:

chmod +x /etc/profile.d/bat.sh

to make the profile configuration script executable. Then to check battery information simply use:

bat

after starting a new shell.

Refer:


Home > CentOS > CentOS 7.x > Monitoring > Laptop battery > CentOS 7.x check laptop battery information