Bob Bernstein <b...@fanatick.org> writes:
> My initial question was _meant_ to be, simply: can this (ps ax|grep
> ssh) be done, or approximated to, using sysctl?

No, systemd is not supposed to replace standard system utilities. (Also
sysctl is a completely unrelated tool to configure kernel parameters;
the systemd utility is systemctl.)

However if you configure your ssh tunnel as a service that systemd
manages, then you can query systemd about its state via systemctl or
directly via systemd's DBus interface:

  Is the service running?
    systemctl is-active my-tunnel

  What is the services main process' PID?
    systemctl -pMainPID show my-tunnel

Note that there is also a per-user instance of systemd to allow regular
users to use systemd to manage their own services if they choose to do
so. Not everything has to be a system service.

Ansgar


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/87twuawrdh....@deep-thought.43-1.org

Reply via email to