What Do htop CPU Bar Colors Mean?
The htop command-line utility provides a real-time,
interactive overview of system resources in Linux, using a vibrant,
color-coded bar to display CPU usage. While it quickly shows how hard
your processor is working, the different colors within that
bar—specifically blue, green, red, cyan, and teal—each represent a
distinct category of CPU consumption. Understanding these colors allows
system administrators and power users to instantly diagnose whether
performance bottlenecks are being driven by standard user applications,
system kernel tasks, low-priority background processes, or hardware
virtualization overhead.
The Breakdown of CPU Bar Colors
When looking at the CPU usage meters at the top of the
htop screen, the total length of the bar represents the
current utilization of that specific CPU core. The bar is divided into
the following color-coded segments:
- Blue (Low-Priority / Nice): This segment represents tasks running with a altered “nice” value (specifically, a positive nice value). These are low-priority processes that voluntarily yield CPU time to standard tasks, often used for background rendering, backups, or compilation.
- Green (Normal User): This color tracks the CPU time consumed by standard, high-priority, or unmodified user-space processes. This includes applications you launch manually, such as web browsers, text editors, or active web servers.
- Red (Kernel / System): This indicates the time the CPU spends executing Linux kernel code and system calls. High red bars often point to heavy I/O operations, driver activity, or system-level resource allocation issues.
- Cyan or Aqua (Steal Time): In virtualized environments, cyan represents “steal time.” This is the percentage of time a virtual CPU waits for real CPU resources from the physical hypervisor, usually indicating that the host machine is oversaturated with other virtual machines.
- Teal or Dark Green (Guest): This color shows the CPU time spent running a virtual processor for guest operating systems, meaning your machine is acting as a host and dedicating resources to run virtual machines or containers.
Interpreting the Balance
A healthy desktop or application server typically displays a dominant green bar with occasional red spikes during heavy file operations. If your CPU bar is consistently red, the system is bogged down by kernel-level tasks, which might require optimizing disk I/O or network configurations. Conversely, a high cyan bar serves as an immediate alert that your cloud provider or local hypervisor is bottlenecked, and your virtual instance is starved for processing power.