Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Action.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,8 +744,8 @@ static Htop_Reaction actionHelp(State* st) {
addbartext(CRT_colors[CPU_IOWAIT], "/", "io-wait");
addbartext(CRT_colors[BAR_SHADOW], " ", "used%");
} else {
addbartext(CRT_colors[CPU_GUEST], "/", "guest");
addbartext(CRT_colors[BAR_SHADOW], " ", "used%");
addbartext(CRT_colors[CPU_GUEST], "/", "virt");
addbartext(CRT_colors[BAR_SHADOW], " ", "used%");
}
addattrstr(CRT_colors[BAR_BORDER], "]");

Expand Down
12 changes: 12 additions & 0 deletions CPUMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ static const int CPUMeter_attributes[] = {
CPU_IOWAIT
};

static const int CPUMeter_attributes_summary[] = {
CPU_NICE,
CPU_NORMAL,
CPU_SYSTEM,
CPU_GUEST
};

typedef struct CPUMeterData_ {
unsigned int cpus;
Meter** meters;
Expand Down Expand Up @@ -68,6 +75,11 @@ static void CPUMeter_updateValues(Meter* this) {

const Machine* host = this->host;
const Settings* settings = host->settings;
if (settings->detailedCPUTime) {
this->curAttributes = CPUMeter_attributes;
} else {
this->curAttributes = CPUMeter_attributes_summary;
}

unsigned int cpu = this->param;
if (cpu > host->existingCPUs) {
Expand Down
Loading