Commit Graph

85 Commits

Author SHA1 Message Date
Maxime Schmitt
3784c5ba0b Expose processes that are both graphical and compute 2022-11-03 19:59:26 +01:00
Maxime Schmitt
da3aec36d9 Option to hide nvtop from the process list 2022-10-21 21:02:48 +02:00
Maxime Schmitt
232b086929 Clang-format all 2022-10-21 12:27:25 +02:00
Maxime Schmitt
daecf69f90 Option to toggle startup messages 2022-10-20 21:06:43 +02:00
Maxime Schmitt
239325d66d Save message option and fix multidevice save 2022-10-20 20:37:04 +02:00
Maxime Schmitt
c57c3aa04f Support info window 2022-10-19 22:33:12 +02:00
Maxime Schmitt
cafc79b976 Support info messages 2022-10-19 22:32:26 +02:00
Maxime Schmitt
55ba8ca80c Setup window to select gpus 2022-10-17 21:34:10 +02:00
Maxime Schmitt
e20ae019fd Dynamic gpu monitored list 2022-10-16 20:55:19 +02:00
Maxime Schmitt
71fdefd225 Rework interface for gpu select option 2022-10-16 16:46:29 +02:00
Maxime Schmitt
1205659afb Remove GPU mask option 2022-10-16 16:21:19 +02:00
Maxime Schmitt
e9537683c2 Extract pdev for all devices 2022-10-16 12:29:57 +02:00
Maxime Schmitt
7de3099b49 Show intel ENC/DEC together 2022-10-15 15:19:57 +02:00
Maxime Schmitt
6bf06da8e7 Fix macro extra arguments 2022-10-15 14:29:28 +02:00
Maxime Schmitt
80332091e8 Fix intel and integrated GPU support 2022-10-15 13:37:22 +02:00
Maxime Schmitt
0cca460697 Use device discovery for AMDGPU 2022-10-09 22:58:31 +02:00
Maxime Schmitt
8cd2ee0892 Udev/sd-device wrapper 2022-10-09 18:40:25 +02:00
Maxime Schmitt
1ad82b6ab1 Preliminary Intel support 2022-10-08 13:57:32 +02:00
Maxime Schmitt
533289230f Uint64 literals 2022-09-10 21:24:52 +02:00
Maxime Schmitt
7bedabca80 Better validity macros 2022-09-04 13:59:16 +02:00
Maxime Schmitt
f103b71aa2 Mark valid AMDGPU cache entries 2022-09-04 10:33:12 +02:00
Maxime Schmitt
9c1772fdc0 AMDGPU compute process support 2022-09-03 23:23:38 +02:00
Maxime Schmitt
f9f68eaeee Code reorganization to sweep /proc once per update
GPUs that rely on the fdinfo to expose process information
(AMDGPU/Intel) can register a callback function to parse a fdinfo file
open to the DRM driver.
The callback function returns a populated process info struct uppon
successfull parsing.

During each main loop iteration, the processes in /proc are scanned only
once instead of once per AMDGPU previously.
2022-09-03 23:06:55 +02:00
Maxime Schmitt
c0031eeb53 Support new amdgpu fdinfo interface kernel >=5.19 2022-08-21 19:14:24 +02:00
Maxime Schmitt
e82df1194d Fix plot for a maximum of 64 GPUs 2022-06-04 12:20:06 +02:00
Maxime Schmitt
e2451db875 C++ friendly header for testing 2022-05-29 11:37:15 +02:00
Maxime Schmitt
6a395ef311 Expose max lines in a plot as a macro 2022-05-26 15:46:32 +02:00
Maxime Schmitt
5c896c159b Enable CMake testing using GTest
Adding a unit test for bug report #147
2022-05-22 21:59:07 +02:00
Maxime Schmitt
5bf86b924e Merge branch 'reallocarrayFix' 2022-05-15 20:25:31 +02:00
Maxime Schmitt
51ed66332d Metrics reset cleanup
Reset all metrics with RESET_ALL. This makes the code cleaner and avoids
errors where some dynamic fields were not correctly reset.
2022-05-15 20:19:41 +02:00
Maxime Schmitt
29e0d6968b Alternative path to get GPU usage from process info
For some older AMG GPU, the total usage is not available from the DRM
interface.
If such case arise, and per-process usage is valid, compute the global
usage from per-process usage.

Fixes #146
2022-05-15 16:14:11 +02:00
Maxime Schmitt
fd174b46ec Linear realloc strategy
- Change from exponential to linear realloc strategy.

There are not too many processes running on the GPUs, incrementing the
process buffer by increments of 16 is more reasonable.

Similarly for DRM file descriptors, there are usually 2-4 of them open
at one time by one process. Increment of 8 should cover most cases.

- Share the PID buffer for DRM FDs while scanning processes to avoid
unnecessary allocations.

- Exit the program if reallocarray fails
2022-05-15 14:40:08 +02:00
Maxime Schmitt
dade5f7a4d Check for reallocarray availability 2022-05-15 13:05:50 +02:00
YiFei Zhu
3772d48170 Prepare mask for inclusion of multiple vendors
* Use shifts for mask and make it into ssize_t (so it gets arithmetic
  shift instead of logical)
* Remove hardcoded names of nvidia in variable names outside of nvidia
  file.
2022-04-04 19:59:30 +02:00
YiFei Zhu
ec6eced4e8 Make GPU vendors use a hooking mechanism
So we don't need to hardcode supported vendors in generic
extract_gpuinfo code.
2022-04-04 19:59:30 +02:00
YiFei Zhu
4dbe17f4c6 Make devices into a linked list and make use container_of
Since we are adding more vendors, having some sort of generic
simplifies the code a lot, instead of using unions.
2022-04-04 19:59:30 +02:00
YiFei Zhu
8d00c79b09 typedef struct foo -> struct foo
Using typedef struct aliases is makes it more difficult to understand
what exactly is being abstrated away [1], I need this change to
understand the code.

nvmlDevice_t in continue to use nvmlDevice_t to make consistent
with nvml headers.

[1] https://www.kernel.org/doc/html/latest/process/coding-style.html#typedefs
2022-04-04 19:59:30 +02:00
Maxime Schmitt
65ebed1dbb Line plot algorithm rewrite 2021-05-25 21:20:13 +02:00
Maxime Schmitt
c5c379e222 Merge process related options to process logic 2021-05-25 14:14:28 +02:00
Maxime Schmitt
d74655ea63 Separate the shortcut window logic from process and setup 2021-05-25 14:14:28 +02:00
Maxime Schmitt
9db18a2a27 end/dec: clear the windows only when needed 2021-05-25 14:13:54 +02:00
Maxime Schmitt
6ea3768f4f Integration of per process utilization to the interface 2021-05-20 13:42:49 +02:00
Maxime Schmitt
9395e511ff NVIDIA per process utilization info retrieval 2021-05-20 13:42:49 +02:00
Maxime Schmitt
7534e39283 Add the process list metric options to the setup window 2021-05-20 13:42:46 +02:00
Maxime Schmitt
37aa79d9f7 Add the GPU/MEM clock rates to the list of metrics that can be plotted 2021-05-18 20:50:50 +02:00
Maxime Schmitt
cb3f979e13 Add the fan speed to the list of metrics that can be plotted 2021-05-18 19:59:00 +02:00
Maxime Schmitt
0282792526 Add the power draw rate to the list of metrics that can be plotted 2021-05-18 19:50:05 +02:00
Maxime Schmitt
fae7d7f65d Update interface codebase
The interface layout selection has been updated to support the interface option.
The interface option stores which data that needs to be plotted for each
devices.

The plot drawing code now supports the reverse plotting option.

The interface uses the ring buffer, the updated version of
the layout computation and plots the data specified by the interface options.
2021-05-17 23:32:59 +02:00
Maxime Schmitt
2f20e3a753 Use a ring buffer to store the chart data 2021-05-17 22:42:28 +02:00
Maxime Schmitt
60f331d5d1 Add the update interval as an option
- Add a general option category.
- Moved the disable color option to the general category.
- Add the interface update interval to the general category.
2021-05-15 20:22:50 +02:00