Code Monkey home page Code Monkey logo

battery-calibration-monitor's Introduction

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

battery-calibration-monitor's People

Contributors

deadbraindev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.