]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-coredump.xml
aa352448b20e1ba081072887821cf9700dfc212e
[thirdparty/systemd.git] / man / systemd-coredump.xml
1 <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6 This file is part of systemd.
7
8 Copyright 2014 Zbigniew Jędrzejewski-Szmek
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="systemd-coredump" conditional='ENABLE_COREDUMP'
25 xmlns:xi="http://www.w3.org/2001/XInclude">
26
27 <refentryinfo>
28 <title>systemd-coredump</title>
29 <productname>systemd</productname>
30
31 <authorgroup>
32 <author>
33 <contrib>Developer</contrib>
34 <firstname>Lennart</firstname>
35 <surname>Poettering</surname>
36 <email>lennart@poettering.net</email>
37 </author>
38 </authorgroup>
39 </refentryinfo>
40
41 <refmeta>
42 <refentrytitle>systemd-coredump</refentrytitle>
43 <manvolnum>8</manvolnum>
44 </refmeta>
45
46 <refnamediv>
47 <refname>systemd-coredump</refname>
48 <refpurpose>Log and store core dumps</refpurpose>
49 </refnamediv>
50
51 <refsynopsisdiv>
52 <para><filename>/usr/lib/systemd/systemd-coredump</filename></para>
53 </refsynopsisdiv>
54
55 <refsect1>
56 <title>Description</title>
57
58 <para><command>systemd-coredump</command> can be used as a helper
59 binary by the kernel when a user space program receives a fatal
60 signal and dumps core. For it to be used in this capacity, it must
61 be specified by the
62 <varname>kernel.core_pattern</varname> <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
63 setting. The syntax of this setting is explained in
64 <citerefentry project='man-pages'><refentrytitle>core</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
65 Systemd installs <filename>/usr/lib/sysctl.d/50-coredump.conf</filename> which configures
66 <varname>kernel.core_pattern</varname> to invoke <command>systemd-coredump</command>.
67 This file may be masked or overridden to use a different setting following normal
68 <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
69 rules.</para>
70
71 <para>The behavior of a specific program upon reception of a
72 signal is governed by a few factors which are described in detail
73 in <citerefentry project='man-pages'><refentrytitle>core</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
74 In particular, the coredump will only be processed when the
75 related resource limits are high enough. For programs started by
76 <command>systemd</command>, those may be set using
77 <varname>LimitCore=</varname> (see
78 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
79 </para>
80
81 <para>The behaviour of <command>systemd-coredump</command> is configured through
82 <filename>/etc/systemd/coredump.conf</filename> and other configuration files. See
83 <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
84 for details. By default, <command>systemd-coredump</command> will log the coredump including a
85 backtrace if possible, and store the core (contents of process' memory contents) in an external
86 file on disk in <filename>/var/lib/systemd/coredump</filename>.</para>
87
88 <para>The log entry and a backtrace are stored in the journal, and can be viewed with
89 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
90 <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
91 may be used to list and extract coredumps or load them in
92 <citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
93 </para>
94
95 <para>The coredump helper is invoked anew each time. Therefore, any configuration
96 changes will take effect on the invocation of <command>systemd-coredump</command>.
97 If the sysctl configuration is modified, it must be updated in the kernel before
98 it takes effect, see
99 <citerefentry><refentrytitle>systemd-sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
100 and
101 <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
102 </para>
103 </refsect1>
104
105 <refsect1>
106 <title>See Also</title>
107 <para>
108 <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
109 <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
110 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
111 <citerefentry project='man-pages'><refentrytitle>core</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
112 <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
113 <citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
114 </para>
115 </refsect1>
116 </refentry>