From 504ebaee2c6ad13d63588dd04ec6bb8e07f6db85 Mon Sep 17 00:00:00 2001 From: Evgeny Naumov Date: Fri, 26 Oct 2018 18:13:27 -0400 Subject: [PATCH] rename plugin to "gpu_nvidia" --- Makefile.am | 10 +++++----- README | 4 ++-- configure.ac | 6 +++--- src/collectd.conf.in | 4 ++-- src/collectd.conf.pod | 2 +- src/{gpu_nvml.c => gpu_nvidia.c} | 7 ++++--- 6 files changed, 17 insertions(+), 16 deletions(-) rename src/{gpu_nvml.c => gpu_nvidia.c} (96%) diff --git a/Makefile.am b/Makefile.am index ebf59358..eaff0dd1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1014,11 +1014,11 @@ gps_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBGPS_LDFLAGS) gps_la_LIBADD = -lpthread $(BUILD_WITH_LIBGPS_LIBS) endif -if BUILD_PLUGIN_GPU_NVML -pkglib_LTLIBRARIES += gpu_nvml.la -gpu_nvml_la_SOURCES = src/gpu_nvml.c -gpu_nvml_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_GPU_CUDA_LDFLAGS) -gpu_nvml_la_LIBADD = $(BUILD_WITH_CUDA_LIBS) +if BUILD_PLUGIN_GPU_NVIDIA +pkglib_LTLIBRARIES += gpu_nvidia.la +gpu_nvidia_la_SOURCES = src/gpu_nvidia.c +gpu_nvidia_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_GPU_CUDA_LDFLAGS) +gpu_nvidia_la_LIBADD = $(BUILD_WITH_CUDA_LIBS) endif if BUILD_PLUGIN_GRPC diff --git a/README b/README index fb10a641..87760548 100644 --- a/README +++ b/README @@ -135,7 +135,7 @@ Features - gps Monitor gps related data through gpsd. - - gpu_nvml + - gpu_nvidia Monitor NVIDIA GPU statistics available through NVML. - hddtemp @@ -753,7 +753,7 @@ Prerequisites * CUDA (optional) - Used by the `gpu_nvml' plugin + Used by the `gpu_nvidia' plugin * libatasmart (optional) diff --git a/configure.ac b/configure.ac index ca869cde..2f73cbd6 100644 --- a/configure.ac +++ b/configure.ac @@ -6414,7 +6414,7 @@ plugin_ethstat="no" plugin_fhcount="no" plugin_fscache="no" plugin_gps="no" -plugin_gpu_nvml="no" +plugin_gpu_nvidia="no" plugin_grpc="no" plugin_hugepages="no" plugin_intel_pmu="no" @@ -6845,7 +6845,7 @@ AC_PLUGIN([filecount], [yes], [Count files in di AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics]) AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin]) AC_PLUGIN([gps], [$plugin_gps], [GPS plugin]) -AC_PLUGIN([gpu_nvml], [$with_cuda], [NVIDIA GPU plugin]) +AC_PLUGIN([gpu_nvidia], [$with_cuda], [NVIDIA GPU plugin]) AC_PLUGIN([grpc], [$plugin_grpc], [gRPC plugin]) AC_PLUGIN([hddtemp], [yes], [Query hddtempd]) AC_PLUGIN([hugepages], [$plugin_hugepages], [Hugepages statistics]) @@ -7271,7 +7271,7 @@ AC_MSG_RESULT([ filecount . . . . . . $enable_filecount]) AC_MSG_RESULT([ fscache . . . . . . . $enable_fscache]) AC_MSG_RESULT([ gmond . . . . . . . . $enable_gmond]) AC_MSG_RESULT([ gps . . . . . . . . . $enable_gps]) -AC_MSG_RESULT([ gpu_nvml . . . . . . $enable_gpu_nvml]) +AC_MSG_RESULT([ gpu_nvidia . . . . . $enable_gpu_nvidia]) AC_MSG_RESULT([ grpc . . . . . . . . $enable_grpc]) AC_MSG_RESULT([ hddtemp . . . . . . . $enable_hddtemp]) AC_MSG_RESULT([ hugepages . . . . . . $enable_hugepages]) diff --git a/src/collectd.conf.in b/src/collectd.conf.in index 14afd119..b7c1b278 100644 --- a/src/collectd.conf.in +++ b/src/collectd.conf.in @@ -657,10 +657,10 @@ # PauseConnect 5 # -# +# # GPUIndex 0 # GPUIndex 2 -# IgnoreSelected 0 +# IgnoreSelected false # # diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index d2409206..cc288a61 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -3210,7 +3210,7 @@ Pause to apply between attempts of connection to gpsd in seconds (default 5 sec) =back -=head2 Plugin C +=head2 Plugin C Efficiently collects various statistics from the system's NVIDIA GPUs using the NVML library. Currently collected are fan speed, core temperature, percent diff --git a/src/gpu_nvml.c b/src/gpu_nvidia.c similarity index 96% rename from src/gpu_nvml.c rename to src/gpu_nvidia.c index be188fea..812cfeb0 100644 --- a/src/gpu_nvml.c +++ b/src/gpu_nvidia.c @@ -29,7 +29,7 @@ SOFTWARE. #include #define MAX_DEVNAME_LEN 256 -#define PLUGIN_NAME "gpu_nvml" +#define PLUGIN_NAME "gpu_nvidia" static nvmlReturn_t nv_status = NVML_SUCCESS; static char *nv_errline = ""; @@ -174,12 +174,13 @@ static int nvml_read(void) { unsigned int sm_clk_mhz; TRYOPT(nvmlDeviceGetClockInfo(dev, NVML_CLOCK_SM, &sm_clk_mhz)) if (nv_status == NVML_SUCCESS) - nvml_submit_gauge(dev_name, "frequency", "sm", 1e6 * sm_clk_mhz); + nvml_submit_gauge(dev_name, "frequency", "multiprocessor", + 1e6 * sm_clk_mhz); unsigned int mem_clk_mhz; TRYOPT(nvmlDeviceGetClockInfo(dev, NVML_CLOCK_MEM, &mem_clk_mhz)) if (nv_status == NVML_SUCCESS) - nvml_submit_gauge(dev_name, "frequency", "mem", 1e6 * mem_clk_mhz); + nvml_submit_gauge(dev_name, "frequency", "memory", 1e6 * mem_clk_mhz); unsigned int power_mW; TRYOPT(nvmlDeviceGetPowerUsage(dev, &power_mW)) -- 2.11.0