| 1 |
.\" Hey, EMACS: -*- nroff -*- |
| 2 |
.\" First parameter, NAME, should be all caps |
| 3 |
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection |
| 4 |
.\" other parameters are allowed: see man(7), man(1) |
| 5 |
.TH BATTERY-GRAPH 1 "September 22, 2002" |
| 6 |
.\" Please adjust this date whenever revising the manpage. |
| 7 |
.\" |
| 8 |
.\" Some roff macros, for reference: |
| 9 |
.\" .nh disable hyphenation |
| 10 |
.\" .hy enable hyphenation |
| 11 |
.\" .ad l left justify |
| 12 |
.\" .ad b justify to both left and right margins |
| 13 |
.\" .nf disable filling |
| 14 |
.\" .fi enable filling |
| 15 |
.\" .br insert line break |
| 16 |
.\" .sp <n> insert n+1 empty lines |
| 17 |
.\" for manpage-specific macros, see man(7) |
| 18 |
.\" TeX users may be more comfortable with the \fB<whatever>\fP and |
| 19 |
.\" \fI<whatever>\fP escape sequences to invode bold face and italics, |
| 20 |
.\" respectively. |
| 21 |
.SH NAME |
| 22 |
battery-graph \- Show a graph of the battery charge |
| 23 |
.SH SYNOPSIS |
| 24 |
.B battery-graph |
| 25 |
.RI [ options ] |
| 26 |
.RI [ files ... ] |
| 27 |
.SH DESCRIPTION |
| 28 |
Show a graph of the battery charge over time. |
| 29 |
.PP |
| 30 |
The files given are assumed to contain battery statistics in the |
| 31 |
battery-stats(5) format. If no files are specified, the default log files |
| 32 |
will be used. |
| 33 |
.PP |
| 34 |
The options can be used for displaying a different interval. An interval is defined in terms of a \fBfrom\fP timestamp, a \fBto\fP timestamp and a \fBduration\fP. By specifying any two, the third will be calculated automatically. A missing duration will be defaulted to 3 hours. |
| 35 |
.SH OPTIONS |
| 36 |
These programs follow the usual GNU command line syntax, with long |
| 37 |
options starting with two dashes (`-'). |
| 38 |
.TP |
| 39 |
.B \-g \fRgeometry\fB, \-\-geometry \fRgeometry |
| 40 |
Sets the X Windows geometry of the graph. This disables text mode. See X(7) |
| 41 |
for how to specify the geometry. |
| 42 |
.TP |
| 43 |
.B \-D \fRdisplay\fB, \-\-display \fRdisplay |
| 44 |
Shows the graph on the given display. The same effect can be achieved |
| 45 |
by setting the DISPLAY environment variable. This disables text |
| 46 |
mode. See X(7) for valid values. |
| 47 |
.TP |
| 48 |
.B \-\-title \fbstring |
| 49 |
Sets the title of the graph window. By default this will be "Battery |
| 50 |
Graph". If this is set to the empty string, gnuplot(1) will be allowed set |
| 51 |
the window title - this can be useful if you want your ~/.Xdefaults to take |
| 52 |
effect for this. |
| 53 |
.TP |
| 54 |
.B \-f \fRdate\fB, \-\-from \fRdate |
| 55 |
Specifies the start date/time for the graph. This accepts exactly the same date/time specifications as the |
| 56 |
.B date |
| 57 |
(1) command - see examples below or the Texinfo manual for date for details. |
| 58 |
.TP |
| 59 |
.B \-t \fRdate\fB, \-\-to \fRdate |
| 60 |
Specifies the ending date/time for the graph. This accepts exactly the same date/time specifications as the |
| 61 |
.B date |
| 62 |
(1) command - see examples below or the Texinfo manual for date for details. |
| 63 |
.TP |
| 64 |
.B \-s \fRdate\fB, \-\-since \fRdate |
| 65 |
Shorthand for \-\-from \fIdate\fR \-\-to now |
| 66 |
.TP |
| 67 |
.B \-d \fRduration\fB, \-\-duration \fRduration |
| 68 |
Specifies the duration for the graph. This can be given in units of seconds, |
| 69 |
hours, days or weeks by suffixing the number with 's' (seconds), 'm' (minutes), |
| 70 |
\&'h' (hours), 'd' (days) or 'w' (weeks). |
| 71 |
.br |
| 72 |
.br |
| 73 |
Units cannot be combined - e.g. '1d6h' will not be valid, whereas '30h' is |
| 74 |
OK. If no unit is specified, minutes will be assumed. |
| 75 |
.TP |
| 76 |
.B \-\-text |
| 77 |
Shows the graph in text mode on stdout. The resulting size of the graph is determined by the values of the environment variables. |
| 78 |
.B LINES |
| 79 |
and |
| 80 |
.B COLUMNS |
| 81 |
(failing that, the output from |
| 82 |
.B tput |
| 83 |
will be used). This is the default when the environment variable DISPLAY is not set. |
| 84 |
.SH EXAMPLES |
| 85 |
.TP |
| 86 |
.B Show the last 2 hours: |
| 87 |
$ battery-graph \-\-duration 2h |
| 88 |
.TP |
| 89 |
.B Show the time since mid day: |
| 90 |
$ battery-graph \-\-from 12:00 \-\-to now |
| 91 |
.br |
| 92 |
or |
| 93 |
.br |
| 94 |
$ battery-graph \-\-since 12:00 |
| 95 |
.TP |
| 96 |
.B Show the hour before last: |
| 97 |
$ battery-graph \-\-from '2 hours ago' \-\-duration 1h |
| 98 |
.TP |
| 99 |
.B Show the 6 hours after noon: |
| 100 |
$ battery-graph \-\-from 12:00 \-\-duration 6h |
| 101 |
.br |
| 102 |
or |
| 103 |
.br |
| 104 |
$ battery-graph \-\-from 12:00 \-\-to 18:00 |
| 105 |
.TP |
| 106 |
.B Show the last 6 hours |
| 107 |
$ battery-graph \-\-from '6 hours ago' |
| 108 |
.br |
| 109 |
or |
| 110 |
.br |
| 111 |
$ battery-graph \-\-since '6 hours ago' |
| 112 |
.TP |
| 113 |
.B Show the last 30 minutes in text mode: |
| 114 |
$ battery-graph \-\-duration 30 \-\-text |
| 115 |
.TP |
| 116 |
.B Show statistics for Tuesday last week |
| 117 |
$ battery-graph \-\-duration 24h \-\-from 'tuesday last week' |
| 118 |
.br |
| 119 |
or |
| 120 |
.br |
| 121 |
$ battery-graph \-\-duration 1d \-\-from 'tuesday last week' |
| 122 |
.TP |
| 123 |
.B Prove that the future hasn't happened yet: |
| 124 |
$ battery-graph \-\-from yesterday \-\-to tomorrow |
| 125 |
.TP |
| 126 |
.B Another way of wasting CPU cycles: |
| 127 |
$ battery-graph /dev/null |
| 128 |
.SH EXIT STATUS |
| 129 |
battery-graph depends on |
| 130 |
.B gnuplot |
| 131 |
(1) to give the correct exit status. |
| 132 |
.SH FILES |
| 133 |
If no files are given on the command line, batter-graph reads from |
| 134 |
.I /var/log/battery-stats |
| 135 |
.SH ENVIRONMENT |
| 136 |
.TP |
| 137 |
.B DISPLAY |
| 138 |
If this variable is not set, \-\-text will be defaulted. |
| 139 |
.TP |
| 140 |
.B LINES / COLUMNS |
| 141 |
Determines the size of the graph in text mode. |
| 142 |
.SH DIAGNOSTICS |
| 143 |
If there are no statistics available for the period chosen, an empty graph will result. |
| 144 |
.SH NOTES |
| 145 |
There is no requirement for the |
| 146 |
.I from |
| 147 |
time to be earlier than the |
| 148 |
.I to |
| 149 |
time - if so, the X axis will be reversed. Similar results can be achieved using a negative duration. |
| 150 |
.PP |
| 151 |
Also: battery-stat is quite happy to list statistics in the future; stupid, but |
| 152 |
obedient. |
| 153 |
.SH AUTHOR |
| 154 |
This manual page was written by Karl E. Jorgensen <[email protected]>, for the |
| 155 |
Debian GNU/Linux system (but may be used by others). |
| 156 |
.SH SEE ALSO |
| 157 |
battery-stats (5), |
| 158 |
.br |
| 159 |
date (1), |
| 160 |
.br |
| 161 |
battery-stats-collector (8) |
| 162 |
.br |
| 163 |
Newer versions of this program may (or may not) be available at |
| 164 |
.IR http://karl.jorgensen.com/battery-stats |
| 165 |
.\" vim:set textwidth=75: |