Skip to content

This is a simple tool written in Bash that allows users to monitor their computer's battery status and log data to a file at specified intervals.

Notifications You must be signed in to change notification settings

deadbraindev/battery-calibration-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

battery-calibration-monitor (WIP)

Warning

This script was written for macOs and Apple Macbooks!
I don't know how it will work on other machines.

Description

This is a simple tool written in Bash that allows users to monitor their computer's battery status and log data to a file at specified intervals.

The script periodically reads the battery charge level and records it, along with the date and time of the reading, to a file. Importantly, the script intentionally places a load on the CPU to accelerate battery discharge, simulating real-world usage. If the battery level drops below 5%, the script automatically shuts down the computer to prevent complete battery discharge. This helps assess the performance and suitability of a newly replaced battery (OEM or replacment part) for customer delivery.

Features:

  • Battery status monitoring with CPU load simulation.
  • Configurable number of cores to be loaded.
  • Logging the percentage battery status, date, and time to a file.
  • Automatic computer shutdown when the battery level falls below 5% to prevent complete discharge.

Using

  1. Clone the repository to your computer.
  2. Set the appropriate permissions for the script, e.g.
 chmod +x battery.sh.
  1. Run the script.
  2. The script will run in the background, monitoring the battery status, simulating CPU load, and logging data to a file.

Important

Make sure you know how to run Bash scripts and have the necessary permissions to shut down the computer to avoid data loss. The script operates with superuser (root) privileges to shut down the computer when needed.

Related articles for battery calibration

Related images

file-nxEZB5InKL

About

This is a simple tool written in Bash that allows users to monitor their computer's battery status and log data to a file at specified intervals.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages