Added DCGM metrics for those with Quadro cards.

Updated include paths for certain CUDA installations
This commit is contained in:
2025-12-06 14:23:36 -08:00
parent af2ceec405
commit a729bdee3b
6 changed files with 212 additions and 9 deletions
+17 -3
View File
@@ -6,11 +6,15 @@
#include <stdlib.h>
#ifdef USE_NVML
#include "nvidia-sensors.h"
#include "nvidia-sensors.h"
#endif
#ifdef USE_DCGM
#include "nvidia-dcgm.h"
#endif
#ifdef USE_LIBPCI
#include "gddr6.h"
#include "gddr6.h"
#endif
#include "icx3.h"
@@ -153,7 +157,6 @@ int main (int argc, char **argv)
return -1;
} else if (gpu_count == 0) {
printf("No supported GPUs found.\nAre you root or do you have udev access to i2c devices?\nDo you need to run `modprobe i2c-dev`?\n");
return -1;
}
/* Check for invalid GPUs */
if (gpu_num > gpu_count - 1) {
@@ -195,6 +198,10 @@ int main (int argc, char **argv)
}
#endif
#ifdef USE_DCGM
init_dcgm();
#endif
/* PCI init for VRAM/hotspot temps */
#ifdef USE_LIBPCI
for (int i = 0; i < gpu_count; i++)
@@ -209,6 +216,10 @@ int main (int argc, char **argv)
if (print_board_sensors)
print_board_info(board_sensors, board_sensor_count);
#ifdef USE_DCGM
print_dcgm(compact, overwrite);
#endif
if (gpu_num == -1) {
/* No GPU specified on command line, loop over all supported GPUs */
@@ -238,6 +249,9 @@ int main (int argc, char **argv)
#ifdef USE_NVML
nvmlShutdown();
#endif
#ifdef USE_DCGM
shutdown_dcgm();
#endif
}
void print_board_info(struct hwmon_avail_sensor *board_sensors, int num_sensors)