Keep your server’s load in the menu bar

Add a Script meter with an ssh one-liner that prints a number, or point a web address meter at a status endpoint that returns JSON. Multimeter draws it like any other meter.

Multimeter’s built-in faces, running live on sample data.

What macOS shows on its own

Nothing in macOS. Usually a Grafana tab or an ssh session.

How Multimeter shows it

  • Script meters run your command with zsh on an interval you choose (every 30 seconds by default, as often as every 2) and stop it after 10 seconds.
  • A new run never starts while the last one is still going, so a slow server can’t pile up ssh connections.
  • Web address meters fetch a URL (every 5 minutes by default, at most every 30 seconds) and read a plain number or JSON.

Set it up

  1. Set up key-based ssh to the server (ssh without a password prompt).
  2. Add a Script meter and paste one of the commands below.
  3. Set a range (0 to your core count for load average) and alert levels.

Every face works with every source it lists. See all 13 faces running live.

Commands

One-minute load average of a Linux box:

Script meter command
ssh -o BatchMode=yes -o ConnectTimeout=5 homelab cut -d' ' -f1 /proc/loadavg

Root disk use in percent:

Script meter command
ssh -o BatchMode=yes -o ConnectTimeout=5 homelab "df --output=pcent / | tail -1"

Running Docker containers:

Script meter command
ssh -o BatchMode=yes -o ConnectTimeout=5 homelab "docker ps -q | wc -l"

BatchMode=yes stops ssh from waiting for a password it will never get, and ConnectTimeout=5 keeps the command inside the 10 second limit when the server is down.

Limits

Script meters need the direct download version from this site. In any version, a web address meter can read a status endpoint instead.

Questions

What does the meter show when the server is down?

The script fails or prints nothing, and the meter shows that no number came back instead of a stale one.

Related

Put it in your menu bar

$19.99 one-time. No subscription. 30-day refund. Needs macOS 13 Ventura or later.