mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
AsynchronousMetrics: Ignore inaccessible sensors
This commit is contained in:
parent
12195b149f
commit
ac1665cdcb
@ -109,6 +109,23 @@ void AsynchronousMetrics::openSensors()
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
file->rewind();
|
||||
Int64 temperature = 0;
|
||||
try
|
||||
{
|
||||
readText(temperature, *file);
|
||||
}
|
||||
catch (const ErrnoException & e)
|
||||
{
|
||||
LOG_WARNING(
|
||||
&Poco::Logger::get("AsynchronousMetrics"),
|
||||
"Thermal monitor '{}' exists but could not be read, error {}.",
|
||||
thermal_device_index,
|
||||
e.getErrno());
|
||||
continue;
|
||||
}
|
||||
|
||||
thermal.emplace_back(std::move(file));
|
||||
}
|
||||
}
|
||||
@ -222,6 +239,23 @@ void AsynchronousMetrics::openSensorsChips()
|
||||
std::replace(sensor_name.begin(), sensor_name.end(), ' ', '_');
|
||||
}
|
||||
|
||||
file->rewind();
|
||||
Int64 temperature = 0;
|
||||
try
|
||||
{
|
||||
readText(temperature, *file);
|
||||
}
|
||||
catch (const ErrnoException & e)
|
||||
{
|
||||
LOG_WARNING(
|
||||
&Poco::Logger::get("AsynchronousMetrics"),
|
||||
"Hardware monitor '{}', sensor '{}' exists but could not be read, error {}.",
|
||||
hwmon_name,
|
||||
sensor_name,
|
||||
e.getErrno());
|
||||
continue;
|
||||
}
|
||||
|
||||
hwmon_devices[hwmon_name][sensor_name] = std::move(file);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user