When you are managing a fleet of headless Linux servers over an SSH connection, monitoring CPU performance using standard tools like top or htop forces you to read chaotic walls of constantly fluctuating numbers. It is incredibly difficult to visualize long-term performance trends just by staring at raw percentages. To generate a massive, continuously updating, color-coded line graph of your system load directly inside a text-only terminal window, you must use the ttyload command.
Installing the ttyload Package
Because it is a highly specialized visualization tool, ttyload is rarely installed by default on mainstream distributions.
To install it on an Ubuntu or Debian server, run:
sudo apt install ttyload
How to Read the Load Graph
Once installed, simply type the command into your terminal and press Enter:
ttyload
The screen will instantly clear, and the application will hijack your entire terminal window to begin drawing a live, ASCII-based line graph. It plots three distinct data points based on the standard Linux load averages, assigning a specific color to each one so you can easily differentiate them:
- Red Line: The 1-minute load average (showing immediate, short-term CPU spikes).
- Green Line: The 5-minute load average (smoothing out the spikes to show medium-term trends).
- Blue Line: The 15-minute load average (providing a stable baseline for long-term server performance).
The graph updates automatically every four seconds. If the red line suddenly spikes vertically across the screen and completely separates from the blue baseline, you instantly know that a specific process is currently crushing the CPU. The y-axis dynamically scales based on how many CPU cores your server has, making the visual data incredibly accurate.
Logging the Graph Output
While the live terminal view is excellent for real-time monitoring, you can also force ttyload to operate in batch mode and dump its visual data directly into a text file for later review.
ttyload -b > cpu_graph_log.txt
By using the -b (batch) flag, the command strips away the complex terminal control characters and outputs clean, raw text representations of the graph. You can leave this running overnight, and in the morning, you can open cpu_graph_log.txt in a standard text editor to visually inspect exactly when the CPU spiked during off-hours.