CentOS 7.x check laptop battery information

From Notes_Wiki
Revision as of 15:40, 28 August 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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