BATTERY-GRAPH(1)
π BATTERY-GRAPH(1) π
okay bestie, welcome to the General Commands Manual entry for battery-graph, and honestly? she's a little icon. she draws you a picture of your battery charge over time. that's it, that's the whole thing, and we're obsessed. π¦
β¨ NAME β¨
battery-graph β Show a graph of the battery charge
πΈ SYNOPSIS πΈ
battery-graph [options] [files...]
π DESCRIPTION π
so basically: show a graph of the battery charge over time. that's the vibe. that's the whole assignment. π
the files you hand over are assumed to contain battery statistics in the battery-stats(5) format. and if you don't specify any files at all? no worries, she'll just use the default log files. she's got you. π«Ά
now, the options can be used to display a different interval. and an interval, bestie, is defined in terms of three things:
- a from timestamp
- a to timestamp
- a duration
you specify any two, and the third one gets calculated automatically. it's giving math girlie. β¨ and if the duration is missing entirely, it defaults to 3 hours.
π OPTIONS π
these programs follow the usual GNU command line syntax, with long options starting with two dashes (-). periodt.
-ggeometry,--geometrygeometry β sets the X Windows geometry of the graph. heads up: this disables text mode. seeX(7)for how to actually specify the geometry.-Ddisplay,--displaydisplay β shows the graph on the given display. you can get the exact same effect by setting theDISPLAYenvironment variable instead. also disables text mode. seeX(7)for valid values.--titlestring β sets the title of the graph window. by default this will be"Battery Graph". and if you set it to the empty string? gnuplot(1) gets to set the window title itself β which is genuinely useful if you want your~/.Xdefaultsto take effect for this. iykyk. π-fdate,--fromdate β specifies the start date/time for the graph. this accepts exactly the same date/time specifications as thedate(1) command β see the examples below, or the Texinfo manual fordatefor the deets.-tdate,--todate β specifies the ending date/time for the graph. same deal: exactly the same date/time specifications as thedate(1) command β check the examples below or the Texinfo manual fordate.-sdate,--sincedate β shorthand for--from date --to now. so cute, so efficient. π-dduration,--durationduration β specifies the duration for the graph. you can give it in units of seconds, hours, days or weeks by suffixing the number with:'s'(seconds)'m'(minutes)'h'(hours)'d'(days)'w'(weeks)
β οΈ units cannot be combined β e.g.'1d6h'will not be valid, whereas'30h'is OK. and if no unit is specified at all, minutes will be assumed.
--textβ shows the graph in text mode on stdout. the resulting size of the graph is determined by the values of the environment variablesLINESandCOLUMNS(and failing that, the output fromtputwill be used). this is the default when the environment variableDISPLAYis not set. π»β¨
π EXAMPLES π
Show the last 2 hours:
$ battery-graph --duration 2h
Show the time since mid day:
$ battery-graph --from 12:00 --to now
or
$ battery-graph --since 12:00
Show the hour before last:
$ battery-graph --from '2 hours ago' --duration 1h
Show the 6 hours after noon:
$ battery-graph --from 12:00 --duration 6h
or
$ battery-graph --from 12:00 --to 18:00
Show the last 6 hours
$ battery-graph --from '6 hours ago'
or
$ battery-graph --since '6 hours ago'
Show the last 30 minutes in text mode:
$ battery-graph --duration 30 --text
Show statistics for Tuesday last week
$ battery-graph --duration 24h --from 'tuesday last week'
or
$ battery-graph --duration 1d --from 'tuesday last week'
Prove that the future hasn't happened yet:
$ battery-graph --from yesterday --to tomorrow
Another way of wasting CPU cycles:
$ battery-graph /dev/null
π EXIT STATUS π
battery-graph depends on gnuplot (1) to give the correct exit status. so like, whatever gnuplot says, that's what you get. she's not doing her own thing here. π
π FILES π
if no files are given on the command line, batter-graph reads from /var/log/battery-stats
π§ ENVIRONMENT π§
DISPLAYβ if this variable is not set,--textwill be defaulted.LINES/COLUMNSβ determines the size of the graph in text mode.
π DIAGNOSTICS π
if there are no statistics available for the period you chose, an empty graph will result. no data, no drawing. it's giving "ghost town". π
β NOTES β
there is no requirement for the from time to be earlier than the to time β if it's the other way round, the X axis will be reversed. and you can get similar results using a negative duration. slay, i guess. π
also: battery-stat is quite happy to list statistics in the future; stupid, but obedient. π«‘
π AUTHOR π
this manual page was written by Karl E. Jorgensen <karl@jorgensen.com>, for the Debian GNU/Linux system (but may be used by others). king behavior honestly. π
πΈ SEE ALSO πΈ
battery-stats(5)date(1)battery-stats-collector(8)
newer versions of this program may (or may not) be available at http://karl.jorgensen.com/battery-stats
and that's the whole page bestie!! this one's dated September 22, 2002 and comes to you from the General Commands Manual β go forth and graph that battery charge πβ¨π
π¦ where this page comes from
- debian bookworm: battery-stats 0.5.6-2+b2 Β· GPL-2.0-or-later
- debian trixie: battery-stats 0.5.6-2.1 Β· GPL-2.0-or-later
- ubuntu jammy: battery-stats 0.5.6-2 Β· GPL-2.0-or-later
- ubuntu noble: battery-stats 0.5.6-2.1 Β· GPL-2.0-or-later
- ubuntu resolute: battery-stats 0.5.6-3 Β· GPL-2.0-or-later
- ubuntu stonking: battery-stats 0.5.6-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms