mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
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) {
|
||||
if (!ProcessList_isCPUonline(&this->super, i))
|
||||
continue;
|
||||
|
||||
char pathBuffer[64];
|
||||
xSnprintf(pathBuffer, sizeof(pathBuffer), "/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq", i);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user