mirror of https://github.com/xzeldon/htop.git
Linux: do not scan frequency for inactive CPUs
This commit is contained in:
parent
68f2bfea61
commit
9df0f62859
|
@ -1961,6 +1961,9 @@ static int scanCPUFreqencyFromSysCPUFreq(LinuxProcessList* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned int i = 0; i < existingCPUs; ++i) {
|
for (unsigned int i = 0; i < existingCPUs; ++i) {
|
||||||
|
if (!ProcessList_isCPUonline(&this->super, i))
|
||||||
|
continue;
|
||||||
|
|
||||||
char pathBuffer[64];
|
char pathBuffer[64];
|
||||||
xSnprintf(pathBuffer, sizeof(pathBuffer), "/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq", i);
|
xSnprintf(pathBuffer, sizeof(pathBuffer), "/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq", i);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue