[systemd-devel] Analyzing and debugging userspace services (with e. g. Valgrind)

Lennart Poettering lennart at poettering.net
Thu Apr 2 02:36:52 PDT 2015


On Thu, 02.04.15 11:27, Paul Menzel (paulepanter at users.sourceforge.net) wrote:

> Dear systemd folks,
> 
> 
> does systemd provide an option to debug userspace services with, for
> example, the instrumentation framework Valgrind [1] to find memory leaks
> or analyze the memory usage in more detail?
> 
> If it does not, should such a feature be added? Would it be useful, to
> just have a switch or option `Valgrind=true` or something like it? It’d
> also be nice to just have a global switch `systemd.valgrind=1` and
> systemd will run each service under Valgrind. Problems lie as always in
> the details, like if and how suppression files should be passed.
> 
> Or should just the unit/service file be edited?

Yeah, I think this is the best way to go. Use "systemctl edit --full
foobar.service" and prefix it's ExecStart= parameter with an
invocation of valgrind.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list