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: