The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 132f8520 authored by Weronika's avatar Weronika
Browse files

added a fan sensor to the nvml plugin

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