This topic has already been partly discussed (Thread getting-more-information-about-the-gpu-and-libraries-loaded.80906), but for fellow users with a dedicated Nvidia GPU, I wanted to share my experience with the various GUI and CLI monitoring tools that I find useful as well as instructions on how to install them. This is my first attempt at a guide of this type, so please be forgiving of any errors or imperfections!
I am running 13.2-RELEASE with Nvidia Driver v525.116.03 and a Nvidia GTX 1660Ti, but these should work on any reasonably recent OS version and card.
Currently, I use four different CLI and GUI tools to monitor GPU usage:
nvidia-settings
x11/nvidia-settings has quite a few useful features, but as a GUI app, it is not really suitable as a monitoring tool for remote servers.
nvidia-smi
The ordinary behaviour of
nvtop
The current version of
nvitop
Hope this is maybe helpful for someone, and will be glad to answer any questions that might come up.
I am running 13.2-RELEASE with Nvidia Driver v525.116.03 and a Nvidia GTX 1660Ti, but these should work on any reasonably recent OS version and card.
Currently, I use four different CLI and GUI tools to monitor GPU usage:
nvidia-smi
- installed with Nvidia driver (x11/nvidia-driver)nvidia-settings
(x11/nvidia-settings)nvtop
- compiled from source, see belownvitop
- Python package installable using devel/py-pip
nvidia-settings
x11/nvidia-settings has quite a few useful features, but as a GUI app, it is not really suitable as a monitoring tool for remote servers.
nvidia-smi
The ordinary behaviour of
nvidia-smi
is to output GPU info only once upon invocation, which is not ideal for continuous monitoring. In my case, the -l
flag, which is intended to serve as a kind of solution for this, caused the output to print repeatedly to the console. Therefore, I've found it's better to combine nvidia-smi
with misc/gnu-watch, e.g.:
Code:
gnu-watch -n 0.5 nvidia-smi
nvtop
The current version of
nvtop
, my usual go-to tool for monitoring Nvidia GPUs on Linux (partly because of its obvious similarities to htop
), does not compile on FreeBSD. Adding support for AMD GPUs in recent versions entailed introducing Linuxisms to the code (e.g., the kcmp
syscall - see https://github.com/Syllo/nvtop/issues/159). Through some trial and error, I found that I could compile on my system after checking out commit 39db844
. Per-process RAM and CPU usage are not displayed because of some assumptions about the structure of Linux /proc/*/stat files, but otherwise everything functions as expected. Note that procfs
must be enabled. Maybe it would be possible to re-write parts of it against libprocstat(3)() (if that would be the right approach?), but I current do not have the time and probably also not the expertise to attempt this.nvitop
nvitop
also outputs a very information-rich and configurable TUI, albeit without nvtop
's visual similarity with htop
. Though I believe nvitop
was originally developed for Linux, I have experienced no compatibility issues with the FreeBSD Nvidia driver. It may well be the most complete GPU monitoring tool that works "off-the-shelf" on FreeBSD.Hope this is maybe helpful for someone, and will be glad to answer any questions that might come up.