622

By default, htop shows colored status bars for processors, memory, and swap. From left to right, the bars are colored green, blue, yellow, and red depending on some thresholds.

What does it mean when the Memory bar has a small level of green and blue, and almost all the remainder is yellow? The swap bar is empty. The color settings for htop are "default".

htop screenshot

tobym
  • 6,671

4 Answers4

726

Hitting F1 or h will show you the key. But for reference, the default colors are:

CPU:

  • Blue = Low priority threads
  • Green = Normal priority threads
  • Red = Kernel threads

Memory:

  • Green = Used memory
  • Blue = Buffers
  • Yellow/Orange = Cache

There are a couple of different color-schemes available, you can see them through hitting F2.

rxmnnxfpvg
  • 189
  • 1
  • 1
  • 8
sysadmin1138
  • 135,853
231

I couldn't find this documented elsewhere. Looking into the code:

There are two modes for CPU metrics reporting: the default one, and a "detailed CPU time" which can be enabled from the Setup screen (Display Options / Detailed CPU time). All of them show the percentage of time spent in different processes:

Default mode

  • Blue: low priority processes (nice > 0)
  • Green: normal (user) processes
  • Red: kernel time (kernel, iowait, irqs...)
  • Orange: virt time (steal time + guest time)

Detailed mode

  • Blue: low priority threads (nice > 0)
  • Green: normal (user) processes
  • Red: system processes
  • Orange: IRQ time
  • Magenta: Soft IRQ time
  • Grey: IO Wait time
  • Cyan: Steal time
  • Cyan: Guest time

Memory meters are more straightforward:

  • Green: Used memory pages
  • Blue: Buffer pages
  • Orange: Cache pages
  • Grey: Free (unused)

Note: Info obtained from htop source code at https://github.com/hishamhm/htop/blob/master/CPUMeter.c .

Luc
  • 306
jjmontes
  • 3,586
15

There are several different colors for each of the bars, except the Swap bar. Here are the color keys used inside of htop:

enter image description here

6

Anyone who just upgraded to Debian 12 (Bookworm), may have noticed a new colour in the RAM, purple.

Purple represents "shared" memory.

htop F1 help

Mint
  • 556