Author: xry111 Date: Sat Mar 14 00:10:05 2020 New Revision: 11781 Log: systemd-custom: add a section discussing core dumps
Modified: trunk/BOOK/chapter07/systemd-custom.xml Modified: trunk/BOOK/chapter07/systemd-custom.xml ============================================================================== --- trunk/BOOK/chapter07/systemd-custom.xml Fri Mar 13 07:45:58 2020 (r11780) +++ trunk/BOOK/chapter07/systemd-custom.xml Sat Mar 14 00:10:05 2020 (r11781) @@ -210,6 +210,52 @@ </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> <title>Long Running Processes</title> <para>Beginning with systemd-230, all user processes are killed when a user -- http://lists.linuxfromscratch.org/listinfo/lfs-book FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page