[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: systemd equivalent



Bob Bernstein <bob@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


Reply to: