Make output of `gdk status` more concise and less confusing

Overview

Currently, the output of gdk status (or gdk start/restart/stop) looks like:

down: /home/peter/devel/gitlab/gdk/services/gitlab-http-router: 9141s; run: log: (pid 4144552) 9141s
down: /home/peter/devel/gitlab/gdk/services/gitlab-topology-service: 1s, want up; run: log: (pid 4144556) 9141s
down: /home/peter/devel/gitlab/gdk/services/gitlab-workhorse: 9141s; run: log: (pid 4144549) 9141s
down: /home/peter/devel/gitlab/gdk/services/nginx: 9141s; run: log: (pid 4144548) 9141s
run: /home/peter/devel/gitlab/gdk/services/postgresql: (pid 4144559) 9141s, normally down; run: log: (pid 4144546) 9141s
down: /home/peter/devel/gitlab/gdk/services/praefect: 9141s; run: log: (pid 4144554) 9141s
down: /home/peter/devel/gitlab/gdk/services/praefect-gitaly-0: 9141s; run: log: (pid 4144547) 9141s
down: /home/peter/devel/gitlab/gdk/services/rails-background-jobs: 9141s; run: log: (pid 4144551) 9141s
down: /home/peter/devel/gitlab/gdk/services/rails-web: 9141s; run: log: (pid 4144550) 9141s
run: /home/peter/devel/gitlab/gdk/services/redis: (pid 4144558) 9141s, normally down; run: log: (pid 4144553) 9141s
down: /home/peter/devel/gitlab/gdk/services/sshd: 9141s; run: log: (pid 4144545) 9141s
down: /home/peter/devel/gitlab/gdk/services/vite: 9141s; run: log: (pid 4144555) 9141s

It's raw output from runit (sv status).

The output has the following issues:

  • It's verbose
    • The full path name is very long
    • It contains PIDs and runtimes of both service and logger
    • It contains normally down
  • It's confusing
    • It's not obvious which service is up or down
    • The runtimes are in seconds

Proposed solution

Make the runit output more concise and more human-readable by using colors and human-friendly formatting.

This would help showing service status for all cells which is currently barely readable (via gdk cells status).

Impacted categories

The following categories relate to this issue:

Steps to replicate (optional)

Proposal (optional)

Environment (optional)

  • Operating system name: <!-- output of `uname -a` command -->
  • Architecture: <!-- output of `arch` command -->
  • The contents of your gdk.yml (if any)
  • Ruby version: <!-- output of `ruby --version` command -->
  • GDK version: <!-- output of `git rev-parse --short HEAD` command -->
Edited by Peter Leitzen