// project · group project

System Health Monitor

A live dashboard for your computer's vital signs, right in the terminal. It only raises the alarm when something stays wrong, not every time it blips.

// the 10-second version

A heart-rate monitor for your computer. It shows how hard the machine is working, turns red when something's in trouble, and keeps a diary of everything.

// what it looks like

One glance tells you everything

CPU     ████████░░░░░░░░░░░░  41%
MEMORY  ███████████████░░░░░  77%
DISK    ██████████░░░░░░░░░░  52%
NET     ↑ 1.2 MB/s   ↓ 8.4 MB/s

FIRED    CPU at 92% (>= 85% for 3 ticks)
RESOLVED CPU recovered to 47%

Green is fine, yellow is stressed, red is trouble. A table below lists the processes using the most CPU.

// why it's cool

No crying wolf

CPU usage spikes constantly. A monitor that alerts on every spike becomes noise, and people learn to ignore it. This one only speaks up when a problem lasts, so when it does alert, it's worth listening to.

// how it works

One loop, every two seconds

  1. CollectRead CPU, memory, disk, network and process stats from the operating system.
  2. EvaluateCheck each value against its limits and fire or clear alerts.
  3. DisplayRedraw the colour-coded dashboard.
  4. LogSave the readings and any alerts to a file, then wait and repeat.

// under the hood

The interesting bits

  • psutil reads live hardware stats on Windows, macOS and Linux; rich turns the terminal into live bars, colours and tables.
  • Sustained ticks: an alert fires only if a value stays past its limit for several checks in a row, like CPU at 85%+ three times straight.
  • Cooldowns: the same alert can't repeat for 60 seconds.
  • Log rotation: the log file rolls over when it gets big, so the monitor can't fill the disk it's watching.
  • Every threshold lives in one config.yaml, so tuning needs no code changes.

// the tricky part

Knowing when to speak up

Too sensitive and it nags; too relaxed and it misses real trouble. Warning and critical levels, sustained ticks and cooldowns together give alerts a short memory of what just happened, which is what makes them trustworthy.

Built as a group project.

  • python
  • psutil
  • rich
  • yaml