Commit Diff


commit - caaad6cc0ef9c3816363b7795641aaa5f4740934
commit + d2618eef3c4447f0670db59084c0bd088335a2b6
blob - c5b883dc99950c3d04b8008e837f4a32816554fa
blob + d9aa79879c6a2653965fcbeb183cc789d835d07c
--- Makefile
+++ Makefile
@@ -1,5 +1,6 @@
-VERSION = 0.2
+VERSION = 0.3
 PREFIX = /usr/local
+MANPREFIX = ${PREFIX}/man
 MY_CFLAGS = -Wall -Wextra -DVERSION=\"${VERSION}\" ${CFLAGS}
 LIBS = -lutil -lncurses
 
@@ -12,8 +13,9 @@ clean:
 	rm -f apmtop *.core
 
 install:
-	mkdir -p ${DESTDIR}${PREFIX}/bin
+	mkdir -p ${DESTDIR}${PREFIX}/bin ${DESTDIR}${MANPREFIX}/man1
 	cp -f apmtop ${DESTDIR}${PREFIX}/bin/
+	cp -f apmtop.1 ${DESTDOR}${MANPREFIX}/man1/
 
 apmtop: apmtop.c
 	${CC} -o $@ apmtop.c ${MY_CFLAGS} ${LIBS}
blob - /dev/null
blob + 563c044a070642f6f6c430069cca30faa27b5b16 (mode 644)
--- /dev/null
+++ apmtop.1
@@ -0,0 +1,82 @@
+.\"
+.\" Copyright (c) 2023 Benjamin Stürz
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate$
+.Dt APMTOP 1
+.Os
+.Sh NAME
+.Nm apmtop
+.Nd monitor power-usage-related statistics
+.Sh SYNOPSIS
+.Nm
+.Op Fl d Ar delay
+.Op Fl V
+.Sh DESCRIPTION
+.Nm
+is a little utility useful for monitoring power-usage-related statistics.
+.Pp
+.Sy Note: This program is still in development and will change.
+.Pp
+The options are as follows:
+.Bl -tag -width -Ds
+.It Fl d Ar delay
+The refresh delay in tenths of seconds. (default: 10)
+.It Fl V
+Print the version of apmtop(1) and exit.
+.El
+.Pp
+.Bl -tag -width 8n
+The keybindings are as follows:
+.It Ar q
+Quit the program.
+.It Ar 1-5
+Show/hide panes 1 through 5.
+.It Ar +/-
+Increase/decrease delay.
+.It Ar (space)
+Pause/resume measuring.
+.El
+.Sh TODO
+.Bl -bullet
+.It
+Fancier graphs using Unicode characters.
+.It
+Being able to specify which sensors to use,
+.It 
+or just show all sensors.
+.It
+Show a warning instead of showing -1 (or similar), when a sensor is missing.
+.It
+Show something, when min=max.
+.It
+Put an empty line before the keybindings-subsection.
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh SEE ALSO
+.Xr apm 8 ,
+.Xr sysctl 8 ,
+.Xr top 1
+.Sh COMPATIBILITY
+OpenBSD does not support all kinds of temperature/power/battery sensors.
+So, make sure that you actually have the sensors you want to measure.
+This can be done, by comparing apmtop's graphs with the output of the following command:
+.Pp
+.Dl $ sysctl hw.sensors
+.Pp
+If you still think, that apmtop(1) shows incorrect data,
+please contact the maintainer.
+.Sh AUTHORS
+.An Benjamin Stürz Aq Mt benni@stuerz.xyz