What Visual Cue Shows a New Process in htop?
The htop command line tool provides a real-time, dynamic
view of a Linux system’s running processes, using distinct color flashes
to visually signal the creation of new processes and the termination of
existing ones. When a new process spawns, its corresponding row in the
process list briefly highlights in green. Conversely,
when a process ends, it momentarily highlights in red
before disappearing from the list. This color-coded system allows
administrators and developers to instantly track system activity and
process churn without scanning text.
How htop Highlights Process Changes
By default, htop refreshes its statistics every delay
interval (typically every 1.5 seconds). During these refresh cycles, the
utility compares the current process tree against the previous snapshot
to identify changes:
- New Processes (Green): Any PID (Process ID) that appears in the current cycle but was absent in the last is highlighted with a green background.
- Terminated Processes (Red): Any PID that was present in the last cycle but has now closed is highlighted with a red background for one refresh cycle before being removed from the display.
This visual feedback is incredibly useful for troubleshooting application behavior, such as identifying “fork bombs,” spotting short-lived cron jobs, or witnessing a daemon crash and rapidly attempt to restart.
Configuring the Visual Alert Delay
If the green and red flashes disappear too quickly for you to track,
or if they are distracting, you can customize or disable this behavior
directly within the htop configuration menu:
- Launch
htopin your terminal. - Press F2 (or S) to enter the Setup menu.
- Use the arrow keys to navigate to Display options.
- Scroll down to the setting labeled Highlight new and old processes.
- Press Space to toggle this feature on or off.
Additionally, the Highlight program basenames option can be toggled in this same menu to change how the process names themselves are colored, further aiding in visual scannability.