Monitoring the CPU and memory load on a Linux server is critical for maintaining performance and preventing crashes. While standard commands like top and htop provide detailed, tabular lists of running processes, they can be difficult to read quickly. If you want a visual, historical graph of your system’s load average rendered entirely in standard terminal text (without needing a graphical desktop environment), you can use the ttyload command.
How ttyload Works
Unlike top, which focuses on individual processes, ttyload focuses exclusively on the system’s “Load Average” (a metric representing the overall demand on the CPU over time). It draws a live, scrolling graph directly in your terminal using standard ASCII characters.
The ttyload utility is not always installed by default, but it is available in almost all standard package repositories. On Ubuntu or Debian, you can install it quickly using sudo apt install ttyload.
Once installed, simply run the command:
ttyload
Your terminal window will immediately begin displaying a scrolling graph. The graph uses three different colors (usually red, green, and blue, depending on your terminal theme) to represent the 1-minute, 5-minute, and 15-minute load averages simultaneously.
Customizing the Graph Display
By default, ttyload refreshes its graph every 4 seconds. If you are monitoring a server during a massive data migration and want to see the load spike instantly, you can speed up the refresh rate using the -i (interval) flag followed by the number of seconds.
ttyload -i 1
This command forces the graph to redraw itself every single second, providing a highly responsive, real-time visualization of your CPU strain.
Monochrome Mode for Older Terminals
If you are connecting to a legacy server via an old SSH client that does not support ANSI color codes, the multi-colored graph will look like a chaotic mess of symbols. You can force ttyload to render the graph in a monochrome, text-only mode by using the -m flag.
ttyload -m
In monochrome mode, the utility relies entirely on distinct text characters (like asterisks and dots) instead of colors to differentiate between the three load average timeframes, ensuring it remains legible on even the oldest terminal emulators.
To exit ttyload and return to your standard bash prompt, simply press Ctrl + C.