[systemd-devel] How to generate core file in system service
Mantas Mikulėnas
grawity at gmail.com
Mon Sep 25 06:47:20 UTC 2017
On Mon, Sep 25, 2017 at 8:59 AM, Xin Long <lucien.xin at gmail.com> wrote:
> Hi,
>
> linux network is using
> systemctl start teamd at team0.service
> to start a teamd service, which will call teamd.
>
> I got a teamd issue to debug, I wanted generate core file by adding abort()
> in teamd and ulimit -c unlimited.
>
> But when I start the deamon by "teamd" directly, I could get core file.
> When I start it by systemctl start teamd at team0.service, no core file was
> generate when it crashed, but only get:
> "systemd: teamd at team0.service: main process exited, code=killed,
> status=6/ABRT"
> in /var/log/messages.
>
> I'm just wondering if there is a way to generate the core file when the
> the program crashes even if I start it as a systeamd service ?
>
Yes, everything works the same way – `ulimit -c` corresponds to LimitCORE=,
so make sure that's set to unlimited in your service.
(Remember that services are spawned by init, not by systemctl, so ulimits
don't carry over directly.)
--
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170925/deb45c07/attachment.html>
More information about the systemd-devel
mailing list