On Thu, Feb 5, 2026 at 2:25 PM Natalie Vock <[email protected]> wrote: > > On 2/5/26 19:58, Alex Deucher wrote: > > Has anyone given any thought on how to support something like top for > > accelerators or GPUs? > > top for accelerators/GPUs kind of exists already, see [1] or [2]. > Clearly, this problem has some kind of solution (looking through the > code, it seems like they check every fd if it has a DRM fdinfo file > associated (which is indeed not particularly efficient)). > > Maybe it's worth asking the authors of the respective tools for their > opinions here?
These tools use the existing interfaces which are available, but require admin privileges to display the per process data for all processes using the accelerators. That's the part I'm interested in solving. For example the drm client list is admin only in debugfs. Could we add something in sysfs which anyone could read to get a list of processes using the GPU? Presumably this was done for privacy/security reasons, but as accelerators become more general purpose, I think it's reasonable for users to see how loaded they are similar to the CPU. Alex > > Natalie > > [1] https://github.com/Umio-Yasuno/amdgpu_top > [2] https://github.com/Syllo/nvtop > > We have fdinfo, but using fdinfo requires extra > > privileges (CAP_SYS_PTRACE) and there is not a particularly efficient > > way to even discover what processes are using the GPU. There is the > > clients list in debugfs, but that is also admin only. Tools like ps > > and top use /proc/<pid>/stat and statm. Do you think there would be > > an appetite for something like /proc/<pid>/drm/stat, statm, etc.? > > This would duplicate much of what is in fdinfo, but would be available > > to regular users. > > > > Thanks, > > > > Alex >
