3802a3d3d7af51ddff31943d5514382f01265770Lennart Poettering<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76672a66c2d4ea7212c14f8f1b5a62b78dTom Gundersen "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek This file is part of systemd.
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek Copyright 2014 Zbigniew Jędrzejewski-Szmek
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek systemd is free software; you can redistribute it and/or modify it
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek under the terms of the GNU Lesser General Public License as published by
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek the Free Software Foundation; either version 2.1 of the License, or
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek (at your option) any later version.
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek systemd is distributed in the hope that it will be useful, but
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek WITHOUT ANY WARRANTY; without even the implied warranty of
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek Lesser General Public License for more details.
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek You should have received a copy of the GNU Lesser General Public License
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek along with systemd; If not, see <http://www.gnu.org/licenses/>.
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek<refentry id="systemd-coredump" conditional='ENABLE_COREDUMP'
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek xmlns:xi="http://www.w3.org/2001/XInclude">
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <productname>systemd</productname>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <email>lennart@poettering.net</email>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <refentrytitle>systemd-coredump</refentrytitle>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <refname>systemd-coredump</refname>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <refpurpose>Log and store core dumps</refpurpose>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <refsynopsisdiv>
12b42c76672a66c2d4ea7212c14f8f1b5a62b78dTom Gundersen <para><filename>/usr/lib/systemd/systemd-coredump</filename></para>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek </refsynopsisdiv>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <para><command>systemd-coredump</command> can be used as a helper
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek binary by the kernel when a user space program receives a fatal
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek signal and dumps core. For it to be used in this capacity, it must
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek be specified by the
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <varname>kernel.core_pattern</varname> <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek setting. Systemd installs
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <filename>/usr/lib/sysctl.d/50-coredump.conf</filename> which
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek configures <varname>kernel.core_pattern</varname> to invoke
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <command>systemd-coredump</command>. This file may be masked or
ff9b60f38bf68eba4a47cabff14547d92e083214Torstein Husebø overridden to use a different setting following normal
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> rules.</para>
dd2b607b7d1ce355e93f9f71cd256ec20b8ae9c4Thomas Hindoe Paaboel Andersen <para>The behavior of a specific program upon reception of a
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek signal is governed by a few factors which are described in detail
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek in <citerefentry project='man-pages'><refentrytitle>core</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek In particular, the coredump will only be processed when the
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek related resource limits are high enough. For programs started by
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt <command>systemd</command>, those may be set using
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <varname>LimitCore=</varname> (see
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <para><command>systemd-coredump</command> will log the coredump
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek including a backtrace if possible, and store the core (contents of
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek process' memory contents) in an external file on disk in
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <filename>/var/lib/systemd/coredump</filename>, or directly in
dd2b607b7d1ce355e93f9f71cd256ec20b8ae9c4Thomas Hindoe Paaboel Andersen the journal. This behavior may be modified using
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <para>Apart from the
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek may be used to list and extract coredumps.</para>
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <citerefentry project='man-pages'><refentrytitle>core</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
5146e7e8aec2d394c06771d4c9d0d03fc2cd911cZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.