On 1/5/24 19:33, James Cook wrote:
On Thu, Jan 04, 2024 at 10:24:18PM +0100, Benjamin Stürz wrote:
Hi ports@,

this is my next little project, after sysutils/lsblk.

apmtop is a simple utility for measuring power consumption
and statistics related to it, in a little TUI interface.
There is still some work to do, but I wanted to see
if anyone would be interested in using/testing this project.

Obviously, this is not (yet) commit-ready, so:
Comments and Suggestions are _very_ welcome!

WWW: https://got.stuerz.xyz/?action=summary&path=apmtop.git

PS:
The keybindings are in the README.md, until I write a man page.

Happy new year,
Benjamin Stürz

Thanks, I tried it out on my laptop.
Thanks for trying.

The BAT and PWR displays always show 0% and 0mW respectively as far as I can tell. Note "apm -l" can show my batter percentage so I guess that at least should be possible to get right. dmesg below in case it's useful.
Now it's fixed.
I forgot to unveil("/dev/apm", "r").
See attached port.

CPU percentage is lower than what "top -1" shows. E.g. with
"++$x while 1" running in a perl repl, top -1 shows 19% user but your tool shows about 10%. I don't know which is more accurate, so this isn't necessarily a complaint.
Try with a different delay, maybe the same one as top uses.
Use `apmtop -d DELAY` with DELAY being measured in tenths of seconds.
e.g. `apmtop -d 10` refreshes every second.

CPU frequency looks plausible. Temperature is at least changing (went from 32 C to 33 C); not sure if it's accurate.
I'll look into that.

Nice utility! Don't know if I'll use it since I like to squeeze such things into my status bar, but maybe I can learn from it. One annoyance: xterm flashes on every update as the TUI is redrawn, which is distracting when I'm trying to look at something else.
I too put these things into my status bar,
but I wanted to have a nice graph,
to make optimizing battery life a little easier.

Attachment: apmtop-0.2.tgz
Description: Binary data

Reply via email to