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

Commit 1e026fa8 authored by Weronika's avatar Weronika

adding the PCIE troughput sensor to the nvml plugin

parent 22f19301
......@@ -101,6 +101,11 @@ group nvml_g2 {
feature GPU_ECC_ERR
}
sensor gpu_pcie_thru {
mqttsuffix /pcie_thru
feature GPU_PCIE_THRU
}
}
......
......@@ -46,6 +46,7 @@ nvmlConfigurator::nvmlConfigurator() {
_gpuFeatureMAP["GPU_UTL_MEM"] = GPU_UTL_MEM;
_gpuFeatureMAP["GPU_UTL_GPU"] = GPU_UTL_GPU;
_gpuFeatureMAP["GPU_ECC_ERR"] = GPU_ECC_ERR;
_gpuFeatureMAP["GPU_PCIE_THRU"] = GPU_PCIE_THRU;
_groupName = "group";
_baseName = "sensor";
......
......@@ -51,6 +51,8 @@ enum GPU_FEATURE {
GPU_UTL_MEM = 10,
GPU_UTL_GPU = 11,
GPU_ECC_ERR = 13,
GPU_PCIE_THRU = 14,
};
/**
......@@ -142,9 +144,12 @@ class nvmlSensorBase : public SensorBase {
case GPU_UTL_GPU:
feature = "GPU_UTL_GPU";
break;
case GPU_ECC_ERR:
feature = "GPU_ECC_ERR";
break;
case GPU_ECC_ERR:
feature = "GPU_ECC_ERR";
break;
case GPU_PCIE_THRU:
feature = "GPU_PCIE_THRU";
break;
}
LOG_VAR(ll) << leading << " Feature type: " << feature;
}
......
......@@ -41,9 +41,6 @@ struct counters_t {
unsigned long long energy_initial;
unsigned long long energy_current;
unsigned long long energy_previous;
// unsigned int freq1;
// unsigned int freq2;
// unsigned int freq3;
unsigned int temperature;
unsigned int fanspeed;
unsigned int clockspeed_graphics;
......@@ -53,6 +50,7 @@ struct counters_t {
unsigned int power;
unsigned long long ecc_counts;
nvmlUtilization_t utilization;
unsigned int pcie_throughput;
} counters;
nvmlSensorGroup::nvmlSensorGroup(const std::string& name) :
......@@ -190,6 +188,10 @@ void nvmlSensorGroup::read() {
err = nvmlDeviceGetTotalEccErrors (env.device, NVML_MEMORY_ERROR_TYPE_CORRECTED,NVML_VOLATILE_ECC,&(counters.ecc_counts));
reading.value = counters.ecc_counts;
break;
case(GPU_PCIE_THRU):
err = nvmlDeviceGetPcieThroughput (env.device, NVML_PCIE_UTIL_COUNT,&(counters.pcie_throughput));
reading.value = counters.pcie_throughput;
break;
}
s->storeReading(reading);
......
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