~whynothugo/dotfiles#29: 
usvc: generate service graphs

I used this last time, but it needs refining:

#!/bin/sh
LIVE=$XDG_RUNTIME_DIR/s6/live

(
echo 'digraph G {'
echo 'graph [layout=dot rankdir=LR]'
for i in $(s6-rc-db -l "$LIVE" list all); do
  for j in $(s6-rc-db -l "$LIVE" dependencies "$i"); do
    printf '"%s" -> "%s"\n' "$i" "$j"
  done;
done;
echo '}'
) | grep -v 's6rc'

This generated: https://0x0.st/H_AK.svg

Some useful external references:

Status
REPORTED
Submitter
~whynothugo
Assigned to
No-one
Submitted
1 year, 5 months ago
Updated
1 year, 5 months ago
Labels
No labels applied.