11.08., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

Commit c4a3b55e authored by Weronika's avatar Weronika

added the compute runnning procesess sensor to the nvml plugin

parent 1e026fa8
...@@ -106,6 +106,12 @@ group nvml_g2 { ...@@ -106,6 +106,12 @@ group nvml_g2 {
feature GPU_PCIE_THRU feature GPU_PCIE_THRU
} }
sensor gpu_run_prcs {
mqttsuffix /run_prcs
feature GPU_RUN_PRCS
}
} }
......
...@@ -47,6 +47,7 @@ nvmlConfigurator::nvmlConfigurator() { ...@@ -47,6 +47,7 @@ nvmlConfigurator::nvmlConfigurator() {
_gpuFeatureMAP["GPU_UTL_GPU"] = GPU_UTL_GPU; _gpuFeatureMAP["GPU_UTL_GPU"] = GPU_UTL_GPU;
_gpuFeatureMAP["GPU_ECC_ERR"] = GPU_ECC_ERR; _gpuFeatureMAP["GPU_ECC_ERR"] = GPU_ECC_ERR;
_gpuFeatureMAP["GPU_PCIE_THRU"] = GPU_PCIE_THRU; _gpuFeatureMAP["GPU_PCIE_THRU"] = GPU_PCIE_THRU;
_gpuFeatureMAP["GPU_RUN_PRCS"] = GPU_RUN_PRCS;
_groupName = "group"; _groupName = "group";
_baseName = "sensor"; _baseName = "sensor";
......
...@@ -52,7 +52,7 @@ enum GPU_FEATURE { ...@@ -52,7 +52,7 @@ enum GPU_FEATURE {
GPU_UTL_GPU = 11, GPU_UTL_GPU = 11,
GPU_ECC_ERR = 13, GPU_ECC_ERR = 13,
GPU_PCIE_THRU = 14, GPU_PCIE_THRU = 14,
GPU_RUN_PRCS = 15,
}; };
/** /**
...@@ -150,6 +150,9 @@ class nvmlSensorBase : public SensorBase { ...@@ -150,6 +150,9 @@ class nvmlSensorBase : public SensorBase {
case GPU_PCIE_THRU: case GPU_PCIE_THRU:
feature = "GPU_PCIE_THRU"; feature = "GPU_PCIE_THRU";
break; break;
case GPU_RUN_PRCS:
feature = "GPU_RUN_PRCS";
break;
} }
LOG_VAR(ll) << leading << " Feature type: " << feature; LOG_VAR(ll) << leading << " Feature type: " << feature;
} }
......
...@@ -51,6 +51,7 @@ struct counters_t { ...@@ -51,6 +51,7 @@ struct counters_t {
unsigned long long ecc_counts; unsigned long long ecc_counts;
nvmlUtilization_t utilization; nvmlUtilization_t utilization;
unsigned int pcie_throughput; unsigned int pcie_throughput;
nvmlProcessInfo_t running_prcs;
} counters; } counters;
nvmlSensorGroup::nvmlSensorGroup(const std::string& name) : nvmlSensorGroup::nvmlSensorGroup(const std::string& name) :
...@@ -192,7 +193,10 @@ void nvmlSensorGroup::read() { ...@@ -192,7 +193,10 @@ void nvmlSensorGroup::read() {
err = nvmlDeviceGetPcieThroughput (env.device, NVML_PCIE_UTIL_COUNT,&(counters.pcie_throughput)); err = nvmlDeviceGetPcieThroughput (env.device, NVML_PCIE_UTIL_COUNT,&(counters.pcie_throughput));
reading.value = counters.pcie_throughput; reading.value = counters.pcie_throughput;
break; break;
case(GPU_RUN_PRCS):
err = nvmlDeviceGetComputeRunningProcesses (env.device,0,&(counters.running_prcs));
reading.value = counters.running_prcs.pid;
break;
} }
s->storeReading(reading); s->storeReading(reading);
#ifdef DEBUG #ifdef DEBUG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment