this is what most software reads

This commit is contained in:
Drath Vader
2025-10-24 11:56:31 +02:00
parent 8b403d7fce
commit 30b4353c7e

View File

@@ -44,7 +44,7 @@ void update(cpuSensors* c) {
// lots of reads but still faster than reading /proc/cpuinfo
char buf[5];
for (uint8_t i = 0; i < N_CPU; i++) {
readFile2("/sys/devices/system/cpu/cpu" + std::to_string(i) + "/cpufreq/scaling_cur_freq", buf, sizeof(buf));
readFile2("/sys/devices/system/cpu/cpu" + std::to_string(i) + "/cpufreq/cpuinfo_avg_freq", buf, sizeof(buf));
c->avg_freq += strtol(buf, NULL, 10);
}
c->avg_freq /= N_CPU;