A Linux laptop battery loggin tool written in Rust.

Overview

batt_log

A Linux laptop battery logging tool written in Rust.

It was built to track power usage of a laptop battery during each session. It keeps tracks of capacity (%), power usage (Watts).

The main goal of this project is to offer a tool that works on any distibution with systemd, runit or openrc.

Installation

The installation script will take care of copying the binary to /usr/local/bin and create a service. It will also create a file /var/log/batt_log.db to store the logs.

To install the tool, you can run the following commands:

cargo build --release
./install.sh

Configuration

The default configuration file is located at /etc/batt_log/config.toml, it follows the TOML file format. You can copy this file to your home directory to override the default configuration, the order it will look for a configuration is the following:

  • ~/.config/batt_log/config.toml
  • ~/.config/batt_log.toml
  • ~/.batt_log.toml
  • /etc/batt_log/config.toml

Configuration options

  • polling_interval: The interval in seconds between each log. Default is 60 seconds.
  • log_file: The path to the log file. Default is /var/log/batt.log.

Uninstall

To uninstall the tool, you can run the following command:

./uninstall.sh
You might also like...
Client for spotify's apt repository in Rust for Arch Linux

spotify-launcher Spotify has a free linux client but prohibits re-distribution, so this is a freely distributable opensource program that manages a sp

Expose standard or fully custom USB peripherals (gadgets) through a USB device controller (UDC) on Linux using Rust.

usb-gadget This library allows implementation of USB peripherals, so called USB gadgets, on Linux devices that have a USB device controller (UDC). Bot

A simple guide for optimizing linux in detail

Optimizing Linux I am writing this guide as to save my progress and let others contribute to increase the performance even further, after all many are

Check the reproducibility status of your Arch Linux packages (read-only mirror)
Check the reproducibility status of your Arch Linux packages (read-only mirror)

arch-repro-status A CLI tool for querying the reproducibility status of the Arch Linux packages using data from a rebuilderd instance such as reproduc

Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)

WSLGit This project provides a small executable that forwards all arguments to git running inside Bash on Windows/Windows Subsystem for Linux (WSL). T

Sytéme d'AutoCompletion de texte pour HeficienceOS est autres distributions linux.

AutoCompletion Pour linux Version: 0.1.0-dev.1 - Note : L'application est encore instable, il est donc recommandé d'être indulgent, l'application risq

A CLI for configuring a GoXLR on Linux

GoXLR configuration utility A tool to configure a GoXLR without requiring a Windows VM. At this time, full device initialization is not possible on Li

stat-rs is a copy of linux command stat

stat-rs is a copy of linux command stat

A collection of semi-useful tools made for GNU/Linux

DECTOOLS A collection of semi-useful tools made for GNU/Linux. Some may work on macOS, though functionality isn't a priority. Depenencies: python, bas

Owner
Marco Padeiro
Estudante do Politécnico de Leiria ESTG
Marco Padeiro
TMM is a Linux native game modding tool. it allows to install and depoly mods for Linux native and wine games.

Tux Mod Manager TMM is a Linux native mod manager made with the Tauri toolkit. It can install, load, remove and deploy mods for both Linux native and

Mathiew May 119 Dec 27, 2022
A system fetch tool for Linux, written in Rust.

fetchit A system fetch tool for Linux, written in Rust. fetchit is a simple system info tool, written in Rust, for Linux based operating systems. It o

Ruturaj Nanoti 26 Nov 21, 2022
🦀️atos for linux by rust - A partial replacement for Apple's atos tool for converting addresses within a binary file to symbols.

atosl-rs ??️ atos for linux by rust - A partial replacement for Apple's atos tool for converting addresses within a binary file to symbols. tested on

everettjf 60 Dec 29, 2022
Basic template for an out-of-tree Linux kernel module written in Rust.

Rust out-of-tree module This is a basic template for an out-of-tree Linux kernel module written in Rust. Please note that: The Rust support is experim

Rust for Linux 118 Dec 26, 2022
Binary Ninja plugin written in Rust to automatically apply symbol information from split debug info on Linux.

Load Symbols Binary Ninja plugin written in Rust to automatically apply symbol information from split debug info on Linux. Requirements Last tested wi

null 4 Jul 20, 2022
Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're working with files or directories, this tool simplifies common file operations with ease.

Rust FileOps Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're w

Harikesh Ranjan Sinha 5 May 2, 2024
A command line tool written in Rust and designed to be a modern build tool + package manager for C/C++ projects.

CCake CCake is a command line tool written in Rust and designed to be a modern build tool + package manager for C/C++ projects. Goals To be easily und

Boston Vanseghi 4 Oct 24, 2022
Pure-Rust rewrite of the Linux fontconfig library (no system dependencies) - using ttf-parser and allsorts

rust-fontconfig Pure-Rust rewrite of the Linux fontconfig library (no system dependencies) - using allsorts as a font parser in order to parse .woff,

Felix Schütt 28 Oct 29, 2022
Shared memory - A Rust wrapper around native shared memory for Linux and Windows

shared_memory A crate that allows you to share memory between processes. This crate provides lightweight wrappers around shared memory APIs in an OS a

elast0ny 274 Dec 29, 2022
A clone of linux cal command, using rust programming language

CLI Calendar command What the project does This command was inspired by Linux Cal command that shows the current month calendar as output (by default)

Mohamed Djoudi Benarfa 2 Nov 16, 2022