Skip to content

BWS1900/sdash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

sdash — systemd dashboard

A small, dependency-light shell script for inspecting and managing systemd units from the terminal. It provides both a static read-out and a fully interactive whiptail-based menu, so you can use it for quick glances or for hands-on service administration.

mode: terminal license: MIT deps: bash, systemd, whiptail

Features

  • Live dashboard — one-shot table of all systemd units with colored status indicators and a summary line (active / inactive / failed / total).
  • Interactive menu — point-and-shoot whiptail UI for the common systemd tasks: viewing failed services, checking status, starting / stopping / restarting units, enabling / disabling units at boot, and tailing the journal.
  • No daemon, no agent — just a single bash file. Drop it on your $PATH and run it.
  • Tiny surface — depends only on bash, systemctl, journalctl, whiptail, watch, and tput (ncurses).

Requirements

  • Linux with systemd
  • bash 4+
  • whiptail (provided by the whiptail / newt package on most distros; installed by default on Debian-family systems)
  • coreutils (tput, awk, sed, wc) — present on any sane Linux

Installation

sudo install -m 0755 sdash /usr/local/bin/sdash

Or, if you just want to try it:

chmod +x ./sdash
sudo ./sdash --menu   # interactive
./sdash               # one-shot dashboard

Usage

sdash [OPTION]

Options:
  (none)            One-shot dashboard view (pipe through `watch` for live
                    updates:  watch -n 2 sdash)
  -i, --menu        Launch the interactive whiptail menu
  -h, --help        Show usage

Modes

1. Dashboard (default)

sdash

Prints a colored table of all systemd units with a header summary. Designed to be wrapped in watch for a live view — the interactive menu does this for you in option 1.

Sample output:

  Systemd Dashboard  Debian Trixie

  ● Active: 142   ○ Inactive: 11   ● Failed: 0   ◌ Total: 153

  UNIT                          ACTIVE     DESCRIPTION
  ────────────────────────────────────────────────────────────
  ● accounts-daemon.service     active     Accounts Service
  ● apparmor.service            active     Load AppArmor profiles
  ○ avahi-daemon.service        inactive   Avahi mDNS/DNS-SD Stack
  ...

2. Interactive menu

sdash --menu

A whiptail-driven menu with the following entries:

# Entry What it does
1 Live dashboard (watch) Re-renders the dashboard every 2 seconds via watch
2 Failed services Lists units currently in the failed state
3 Service status Prompts for a unit name and shows systemctl status
4 Start / Stop / Restart Prompts for a unit and an action, then runs sudo systemctl …
5 Enable / Disable Prompts for a unit and toggles boot-time activation
6 Last 50 journal lines Shows the last 50 lines of journalctl
q Quit Exit the menu and clear the screen

Any action that mutates a service (start, stop, restart, reload, enable, disable) is prefixed with sudo, so you'll be prompted for your password the first time it runs.

Keyboard controls

sdash is keyboard-only — no mouse, no graphical session required. The controls depend on which surface you're on:

Interactive whiptail menu

  • ↑ / ↓ — move the selection up or down the list
  • Enter — confirm the highlighted option (or activate the focused button)
  • Tab / Shift+Tab — move focus between the list and the <Ok> / <Cancel> buttons
  • Esc — cancel the current dialog and return to the previous menu
  • q — quit from the main menu (the bottom-most entry)
  • The active option in the title bar shows live counts: active | failed | total

Whiptail input boxes (Service status, Start/Stop/…, Enable/Disable)

  • Type the unit name (e.g. nginx.service.service is optional for most units, but adding it avoids surprises)
  • Enter — submit
  • Esc — cancel and return to the menu
  • Backspace — edit what you typed

Whiptail message boxes (Failed services, Status, Journal, action confirmation)

  • Enter — dismiss the box
  • Esc — close the box
  • Page Up / Page Down — scroll if the content is longer than the box

Live dashboard (watch mode, option 1 in the menu)

  • Ctrl+C — stop watching and return to the menu
  • The dashboard refreshes every 2 seconds; the tput-driven colors are re-emitted each cycle

watch directly

If you run watch -n 2 sdash yourself, watch adds:

  • Ctrl+C — exit watch
  • q — also exits watch in some builds
  • Space — toggle the header on/off (display only)

Color key

Symbol Color Meaning
green Unit is active / running
red Unit is failed
yellow Unit is any other state

License

Released under the MIT License.

About

Small bash dashboard for inspecting and managing systemd units from the terminal.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages