Skip to main content

Monitoring your resources: CPU, RAM, disk and bandwidth

Read the graphs, spot the trend before it becomes an outage, and know what "normal" looks like.

Resource graphs answer one question: am I about to run out of something?

What each metric tells you

CPU / load average
Load average is the number of processes wanting CPU. Compare it to your core count: load ≈ cores means fully used; load steadily above cores means you are queueing work.

Memory
Watch both used and swap. Swap in active use (si/so in top) means RAM pressure — performance falls off a cliff. If it trends up over days, you have a leak or you are under-sized.

Disk
Track free space and trend. Disk fills predictably; a graph shows you the slope so you can act before it hits 95%. A full disk breaks databases and deploys.

Bandwidth
Outbound traffic is usually what you pay for. Watch the peak, not the average.

I/O
High wait time (iowait) with idle CPU means the disk is the bottleneck — see Bandwidth vs CPU bottlenecks.

On the box, quickly

bash
uptime                 # load average
free -h                # memory and swap
df -h                  # disk space
top                    # live view (or htop if installed)
ss -s                  # socket summary
uptime && vmstat 1 5   # a five-second sample with iowait

Reading trends, not snapshots

A single spike is noise. A slow climb is a problem. Look at the graph over days:

  • Memory that only ever grows → leak.

  • Disk that drops a step each night → logs or backups not rotating.

  • Bandwidth that doubles month on month → plan a resize before you hit the cap.

Set thresholds that are early enough

Alert at 80% disk, not 95%. Alert when swap appears, not when the OOM killer fires. The point of monitoring is the warning, not the post-mortem.

Related reading