|
|
|
@ -876,6 +876,7 @@ void init_gpu_stats(uint32_t& vendorID, uint32_t reported_deviceID, overlay_para
|
|
|
|
|
amdgpu.gtt_used = fopen((device_path + "/mem_info_gtt_used").c_str(), "r");
|
|
|
|
|
|
|
|
|
|
const std::string hwmon_path = device_path + "/hwmon/";
|
|
|
|
|
if (fs::exists(hwmon_path)){
|
|
|
|
|
const auto dirs = ls(hwmon_path.c_str(), "hwmon", LS_DIRS);
|
|
|
|
|
for (const auto& dir : dirs) {
|
|
|
|
|
if (!amdgpu.temp)
|
|
|
|
@ -889,6 +890,7 @@ void init_gpu_stats(uint32_t& vendorID, uint32_t reported_deviceID, overlay_para
|
|
|
|
|
if (!amdgpu.gpu_voltage_soc)
|
|
|
|
|
amdgpu.gpu_voltage_soc = fopen((hwmon_path + dir + "/in0_input").c_str(), "r");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!metrics_path.empty())
|
|
|
|
|
break;
|
|
|
|
|