Skip to content

krysopath/watchmon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a simple battery monitor cron tool

I wondered how quickly my laptop battery deteriorates over time. This little tool creates a sqlite database and records battery values from /sys/class/power_supply.

For convencience a simple dump method is included.

install

go get github.com/krysopath/watchmon
go install github.com/krysopath/watchmon

Get the binary and build it.

crontab -e

Open the crontab editor

 */N * * * * $HOME/go/bin/watchmon | logger

Adapt the N to set how many minutes between executions should pass. Also check the PATH.

Lastly:

watchmon -dbcreate

Creates the sqlite file

dump

watchmon -dump

shells with benefits

To enable <TAB><TAB> madness, run bash with bash-completions and source:

. watchmon-completion

About

collect battery health data in sqlite

Resources

Stars

Watchers

Forks

Packages

No packages published