Merge branch 'cpu_count' of cgzones/htop

This commit is contained in:
Daniel Lange
2021-08-02 15:21:07 +02:00
40 changed files with 554 additions and 282 deletions

View File

@ -824,7 +824,7 @@ void Process_writeField(const Process* this, RichString* str, ProcessField field
case PERCENT_NORM_CPU: {
float cpuPercentage = this->percent_cpu;
if (field == PERCENT_NORM_CPU) {
cpuPercentage /= this->processList->cpuCount;
cpuPercentage /= this->processList->activeCPUs;
}
if (cpuPercentage > 999.9F) {
xSnprintf(buffer, n, "%4u ", (unsigned int)cpuPercentage);