battery-stats(5)

battery-stats5

Collected battery statistics

Overview

The battery-stats contains statistics about battery charge over time, as collected by the battery-stats-collector (8) daemon.

Format

Each line in the file represents one sample and is of the form:
<seconds> <charge%> <powermode> <UTC-date> <UTC-time> separated by spaces and terminated by a newline.

Where:

seconds

is the number of seconds since 1st Jan 1970 00:00:00 UTC

charge%

is the battery charge a number between 0 and 100

powermode

indicates the power mode:

0 A/C off
1 On battery
2 On backup power

UTC-date

a human-readable date in the format YYYY/MM/DD. Note that this is in UTC, not the local or system timezone.

UTC-time

a human-readable time in the format HH:MM:SS (using a 24-hour clock). Note that this is in UTC, not the local or system timezone.

minutes-left

is the BIOS estimate of how many minutes of running time the battery would provide. This may be unreliable, depending on the BIOS through which it was collected.

Examples

A battery under charge might result in the following samples:

1032651245 27 1 2002/09/21 23:34:05 94
1032651275 28 1 2002/09/21 23:34:35 97
1032651305 29 1 2002/09/21 23:35:05 100
1032651335 30 1 2002/09/21 23:35:35 103
1032651365 30 1 2002/09/21 23:36:05 106

Files

The default set-up is to save battery statistics in /var/log and rotate the logs weekly, which results in this set of files:
/var/log/battery-stats - current (most recent) statistics
/var/log/battery-stats.[0-9]+ - less recent statistics
/var/log/battery-stats.[0-9]+.gz - ancient statistics

Releases

10 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1–5.0
  2. 6.0–7
  3. 9–13

Author

Karl E. Jorgensen <[email protected]>

From battery-stats 0.5.6-2.1 in Debian 13 (Trixie). Parsed by carta from the page's man source.