mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
systemd-custom: add a section discussing core dumps
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11781 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
6fb10045a9
commit
4d796cab3e
@ -209,6 +209,52 @@ EOF</userinput></screen>
|
|||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
<sect2>
|
||||||
|
<title>Working with Core Dumps</title>
|
||||||
|
|
||||||
|
<para>Core dumps are useful to debug crashed programs, especially
|
||||||
|
when a daemon process crashes. On systemd booted systems the core
|
||||||
|
dumping is handled by <command>systemd-coredump</command>. It will
|
||||||
|
log the core dump into the journal and store the core dump itself in
|
||||||
|
<filename class="directory">/var/lib/systemd/coredump</filename>.
|
||||||
|
To retrieve and process core dumps, <command>coredumpctl</command>
|
||||||
|
tool is provided. Here are some examples of frequently used commands:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para><command>coredumpctl -r</command>: lists all core dumps in
|
||||||
|
reversed chronological order.</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para><command>coredumpctl -1 info</command>: show the information
|
||||||
|
of the last core dump.</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para><command>coredumpctl -1 debug</command>: load the last core
|
||||||
|
dump into <ulink url="&blfs-book;general/gdb.html">GDB</ulink>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
<para>Core dumps may use a lot of disk space. The maximum disk space
|
||||||
|
used by core dumps can be limited by creating a configuration file in
|
||||||
|
<filename class="directory">/etc/systemd/coredump.conf.d</filename>.
|
||||||
|
For example:</para>
|
||||||
|
|
||||||
|
<screen role="nodump"><userinput>mkdir -pv /etc/systemd/coredump.conf.d
|
||||||
|
|
||||||
|
cat > /etc/systemd/coredump.conf.d/maxuse.conf << EOF
|
||||||
|
<literal>[Coredump]
|
||||||
|
MaxUse=5G</literal>
|
||||||
|
EOF</userinput></screen>
|
||||||
|
|
||||||
|
<para>See <filename>systemd-coredump(8)</filename>,
|
||||||
|
<filename>coredumpctl(1)</filename>, and
|
||||||
|
<filename>coredump.conf.d(5)</filename> manual pages for more
|
||||||
|
information.</para>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Long Running Processes</title>
|
<title>Long Running Processes</title>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user