Skip to content

This code logs power plugged status every one minute for profiling purpose.

Notifications You must be signed in to change notification settings

thamaraiselvam/Log-AC-power-status-Bash-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Logging-AC-power-plugged-status

This code logs power plugged status every one minute for profiling purpose.

Install acpi package to get the battery percentage

Arch Linux

sudo pacman -S acpi

Debian based distro ( Debian, Ubuntu, Linux mint..etc)

apt install acpi

Make the script executable from a terminal,

chmod +x /path/to/battery-logger.sh

Open your personal crontab as

EDITOR=vim crontab -e

and append the following line in it to run your script every minute.

* * * * * /path/to/battery-logger.sh

About

This code logs power plugged status every one minute for profiling purpose.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages