Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

tload

Graphic representation of system load average.

Description

Displays a scrolling ASCII graph of the 1-minute system load average in the terminal. Each column represents one sample, and the height of the bar indicates the load value. The graph scrolls left as new samples are added. Color indicates load severity: green for low, yellow for moderate, red for high.

Press q to quit.

Inputs

  • /proc/loadavg – 1, 5, and 15 minute load averages

Arguments

FlagDescription
-s, --scale SCALEVertical scale in characters per unit of load (default: 4). A smaller value produces a larger visual scale.
-d, --delay SECSDelay between graph updates in seconds (default: 1, minimum: 0.1)

Behavior

Display

The terminal is divided into two regions:

  1. Header line: shows the current 1, 5, and 15 minute load averages.
  2. Graph area: fills the remaining terminal height. Each column is one sample of the 1-minute load average. The bar height is load * scale characters.

Graph characters

  • * – normal bar fill
  • = – tick mark at each scale interval (e.g., at load 1.0, 2.0, etc. when scale is 4)

Color

Bar color is determined by the load value of that sample:

  • Green: load <= 2.0
  • Yellow: load > 2.0 and <= 4.0
  • Red: load > 4.0

Terminal handling

Uses ratatui with crossterm as the terminal backend. Enters alternate screen and raw mode on startup, restores the terminal on exit. Responds to terminal resize by redrawing to fit the new dimensions.

Exit codes

CodeMeaning
0Normal exit (user pressed q)
1Failure (terminal initialization error)