Amdtop: a btop/nvitop inspired Linux TUI system monitor (CPU/GPU/NPU)

I was looking for a better system monitor for my Framework Desktop when running GPU workloads (similar to nvitop but for AMD systems) and couldn’t find one, so I ended up making my own. This fully supports Strix Halo monitoring of CPU, GPU(s), and NPU as well (if you have the right kernel driver exposing its counters).

It also supports multiple GPUs, and also has built in theme support (everything from btop, and a number of other visual customizations (folding sections, bar rendering options). It should be pretty easy to install if you have Rust setup:

cargo install amdtop

(also added as an AUR for Arch users)

It’s brand new, but it does basically everything I want out of it (maybe the process list could have some more features, like sorting/filtering). Sharing in case anyone else is looking for something similar, might find it useful.

MIT licensed: GitHub - lhl/amdtop: nvitop-style TUI frontend for amdgpu_top (AMDGPU + Strix Halo XDNA NPU) · GitHub

2 Likes

There is a rust one called amdgpu_top its very similar.

I actually use libamdgpu_top for the GPU backend, but I as far as similarity goes for amdgpu_top, I’m really not seeing it:

The state of amd-smi and amdgpu_top are actually the reason I ended up writing amdtop

1 Like

I allready actually quite like amdgpu_top, so same data with graphs and maybe smightly better categorisazion sounds nice.

Does this handle hotplug like amdgpu_top (not at all) or does that work better/worse?

Does it show the different sensors/metrics different amd generations have (pcie link speed on polaris or the hbm temps on vega for example)?

It uses libamdgpu_top for GPU, so probably the same, although I do some forced refreshes and some other fixes like proper GPU numbering (libamdgpu_top does random PCIe order! That was super confusing). Give it a try. I don’t have a hotplug GPU, but happy to take PRs.

I do some adjustments - eg, I handle Strix Halo’s APU MBW reporting vs dGPU reporting, but if there’s additional stuff on hardware you want, submit a PR.

I plan to, I have quite a collection of different generation amd gpus and a bunch of egpu boards.

1 Like

@lhl Ok so hotplug does not work, needs an application restart to register the gpu just like amdgpu_top itself. If I have it running with one gpu and unplug that and swap to another it seems to show it’s load and temperature under the name of the previous one.

Some metrics that amdgpu_top shows that I could not find in amdtop (tested gcn1 through rdna2):

  • Pcie link speed (Gcn1+)
  • Memory temperature (Vega, rdna1/2)
  • Power (for some reason not working on my vega64 and ploaris, gcn1 through 3 and rdna1/2 worked just fine)

Another thing, not being able to close it using ctrl-c is a bit odd for a console app, was that intentional?

Over all pretty nice, do you know an easy way to put load on the npu to see if that shows anything?

Adrian, thanks for the feedback.

hotplug: confirmed that discovery only happens at App::init() - w/o hardware hard to tell the most efficient way to handle this, I don’t want to be constantly polling device discovery, but I’ve added an undocumented ‘r’ command to do a device list refresh.

I’ve added max PCIe link speed with the pcie id

If memory temp is available, I’ve added to the power/temp line, i’ll let it sit a while and see how it looks/if it’s useful, is getting a little crowded visually

power: I think older cards don’t expose avg power, there’s an input power i added a fallback on, might be useful, might not, I don’t have the GPU to test on any future reports probably should go through gh issue report to track in case someone wants to submti a pr

ctrl-c: added - crossterm doesn’t handle the binding by default so it has to be manually added

npu: i have some docs, xrt-smi can load up the NPU: amdtop/docs/NPU.md at main · lhl/amdtop · GitHub - the big issues atm is upstream amdxdna driver does not have perf counters exposed, so you need to install out of tree drivers if you want that. that’s a driver/kernel limitation atm.

v0.2.6 pushed w/ those and a few other changes: Release amdtop v0.2.6 · lhl/amdtop · GitHub

That allready sounds quite useful. Automated detection would of course be nice but that is a leg up over amdgpu_top

Sweet

I think just showing the number is probably fine, graphing it may be a bit much.

It’s not speciffically oder cards it’s a small range in between, power display woked for Gcn1-3 (older), did not work for Gcn4 and 5 (polaris and vega) and worked again for Rdna1 and 2 (newer)

Gonna give it a shot when I get to it, maybe not with all of the gpus this time though.