In January 2021 we will introduce a 10 GB quota for project repositories. Higher limits for individual projects will be available on request. Please see https://doku.lrz.de/display/PUBLIC/GitLab for more information.

Commit 132f8520 authored by Weronika's avatar Weronika

added a fan sensor to the nvml plugin

parent 58de956d
......@@ -36,6 +36,7 @@ nvmlConfigurator::nvmlConfigurator() {
_gpuFeatureMAP["GPU_ENERGY"] = GPU_ENERGY;
_gpuFeatureMAP["GPU_POWER"] = GPU_POWER;
_gpuFeatureMAP["GPU_TEMP"] = GPU_TEMP;
_gpuFeatureMAP["GPU_FAN"] = GPU_FAN;
_groupName = "group";
_baseName = "sensor";
......
......@@ -41,6 +41,7 @@ enum GPU_FEATURE {
GPU_ENERGY = 0,
GPU_POWER = 1,
GPU_TEMP = 2,
GPU_FAN = 3,
};
/**
......@@ -105,6 +106,9 @@ class nvmlSensorBase : public SensorBase {
case GPU_TEMP:
feature = "GPU_TEMP";
break;
case GPU_FAN:
feature = "GPU_FAN";
break;
}
LOG_VAR(ll) << leading << " Feature type: " << feature;
}
......
......@@ -45,13 +45,13 @@ struct counters_t {
// unsigned int freq2;
// unsigned int freq3;
unsigned int temperature;
// unsigned int fanspeed;
unsigned int fanspeed;
// unsigned int clockspeed_graphics;
// unsigned int clockspeed_sm;
// unsigned int clockspeed_mem;
// nvmlMemory_t memory;
// nvmlMemory_t memory;
unsigned int power;
// unsigned long long ecc_counts;
// unsigned long long ecc_counts;
// nvmlUtilization_t utilization;
} counters;
......@@ -147,14 +147,18 @@ void nvmlSensorGroup::read() {
reading.value = counters.power;
break;
case(GPU_TEMP):
err = nvmlDeviceGetTemperature(env.device,NVML_TEMPERATURE_GPU,&(counters.temperature));
reading.value = counters.temperature;
break;
err = nvmlDeviceGetTemperature(env.device,NVML_TEMPERATURE_GPU,&(counters.temperature));
reading.value = counters.temperature;
break;
case(GPU_FAN):
err = nvmlDeviceGetFanSpeed(env.device,&(counters.fanspeed));
reading.value = counters.fanspeed;
break;
}
s->storeReading(reading);
//ifdef DEBUG
#ifdef DEBUG
LOG(debug) << _groupName << "::" << s->getName() << " raw reading: \"" << reading.value << "\"";
//endif
#endif
}
} catch (const std::exception& e) {
LOG(error) << "Sensorgroup" << _groupName << " could not read value: " << e.what();
......
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