orchid ~ # rc-service agetty.ttyS0 status
* status: started since 2026-05-28 20:26:12
* command line: /sbin/agetty -a root --noclear ttyS0 linux
* pid: 1695
* memory: 7.3MiB
* cgroup: /openrc.agetty.ttyS0
* 1694 supervise-daemon agetty.ttyS0 --start --pidfile /run/agetty.ttyS0.pid --respawn-period 60 /sbin/agetty -- -a root --noclear ttyS0 linux
* 1695 /bin/login -f --
* 1702 -bash
* 1745 /sbin/openrc-run /etc/init.d/agetty.ttyS0 status
* 1746 /bin/sh /usr/libexec/rc/sh/openrc-run.sh /etc/init.d/agetty status
and compare to what we have in master right now :V
$ rc-service agetty.tty1 status
* status: started
RE: https://social.vlhl.dev/objects/b857666b-204d-4da0-a0fa-e550032dccf1
@navi how much of that is generic OpenRC and how much information about the service is implemented in supervise-daemon? In other words, how much do I need to work on the s6 backend in order to get the same result for supervisor=s6 services?
the since $date, command line, and pid (aka child_pid) comes from supervise-daemon
openrc itself handles putting services in cgroups so as long as s6 doesn’t move things to another cgroup, the memory and cgroup tree should also work
though for non-linux systems, memory will rely on ps -p thus will also need access to child_pid from the supervisor
you can probably use service_set_value from the s6 generated run script to set child_pid, start_time and the command line, since the options/ dir is kind of an abstraction to per-service metadata, and supervise-daemon just populates it with rc_service_value_set(), then the same function as supervise-daemon will work for s6
i’ll probably add more bits to this (e.g. a tail -n 10 of logging, once that’s figured out and enabled universally), but that we can coordinate as well
@navi I can get information maintained in s6-supervise from an outside script via https://skarnet.org/software/s6/s6-svstat.html ; it should support all the information you're currently maintaining in supervise-daemon. I just need to know how to plug the information into the output of rc-status; I suppose it can be done by copying your status() function and adapting it to call s6-svstat wherever needed. It should work without too much hassle.