[systemd-devel] Show library status

Lennart Poettering lennart at poettering.net
Tue Jan 3 13:02:26 PST 2012


On Mon, 02.01.12 20:11, Thomas Meyer (thomas at m3y3r.de) wrote:

> Hello,
> 
> is there an option to show the service units with changed/deleted on disk libraries?
> 
> something like "sudo grep deleted /proc/*/maps | sort -t / -k 1,3 -u"
> for systemctl? (btw. is this the best/correct way of detecting this,
> i.e. grep for "deleted" in all /proc/*/maps files?)

Hmm, I am not sure this really belongs in systemctl, especially since
there is a lot more that programs access, than just libraries, and this
might create the false impression we could reliably detect what that
was. For starters, services use a lot of files on disk that aren't
libraries. One could probably detect those in a similar way, easily,
too, but it gets way more complicated if you want to detect that
upgrading of one socket service or dbus service might require another
service using it to be restarted too.

I do see the value of such a too, so I encourage you to post a script
for this online (and here on the ML), but I don't think it should be
systemctl.

A tool like this could be relatively easily be written with using
sd_pid_get_service() from libsystemd-logind. Or alternatively, a shell
script could even simply parse /proc/$PID/cgroup to detect the same
information.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list