Bash script for collecting power state data to check for power outages.
The Power State Logger was created to:
- Check when the server lost power: The main purpose of the logger is to check for power outages on the electricity grid. Because server is on laptop when there is no electricity in the server room the server continue to work but the power state changes. The script logs this change in a log file powe_events.log
- Email notifications - to be developed: Send email notifiactions to administrator when there is power loss.
- Create the Script
git clone https://github.com/spaskol/bat_status.git
or run in background
. bat_state.sh &
cat power_events.log
- Add more logging events like battery percentage and remaining time
- ** email notification **