Skip to content
 
 

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

bash_errata

A collection of bash scripts that are small but still useful.

Battery Runtime Logger

This script simply monitors your battery percentage and writes the output to a log file in the same folder with the date and time on a separate line. It checks once a minute and logs the data. At 80, 60, 40, 20, and 10 percent a notification appears indicating you have reached that percentage, and in the log it will then note how much approximate screen on time you have had. I say approximate because if your display turns off but the machine is still awake (not sleeping) then this will continue logging and counting that time. In my case, because of the way my system is setup it is more accurate since my machine doesn't power off the screen until it's going to sleep.

Note regarding battery percentage changes:

I have a laptop that will sometimes go from ~35% to ~6% without warning, so I coded in a spot that will check for a significant drop in percentage across a 1 minute period. You can comment out the drop-check block if you want to disable it. If you change the comparison value, you can adjust how severe of a drop is cause for alarm. I chose 5 percent since right now I don't have any workloads that would cause that big of a drop generally speaking, and anything larger than that I want to be made aware of.

zfs_test.sh

New script for finding datasets based on a grep filter and a function. This is going to be used in other scripts and I will be testing other functions in this scripts as well. Then after having some example scripts here I'll be making test scripts for fleshing out a full production build for handling ZFS dataset backups.

About

A collection of bash scripts that are small but still useful.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages