From 4d796cab3ef4508b3c3dbf5931a1eada35e29775 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 14 Mar 2020 07:10:05 +0000 Subject: systemd-custom: add a section discussing core dumps git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11781 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter07/systemd-custom.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'chapter07/systemd-custom.xml') diff --git a/chapter07/systemd-custom.xml b/chapter07/systemd-custom.xml index 45d57ce65..787fd4572 100644 --- a/chapter07/systemd-custom.xml +++ b/chapter07/systemd-custom.xml @@ -209,6 +209,52 @@ EOF + + Working with Core Dumps + + Core dumps are useful to debug crashed programs, especially + when a daemon process crashes. On systemd booted systems the core + dumping is handled by systemd-coredump. It will + log the core dump into the journal and store the core dump itself in + /var/lib/systemd/coredump. + To retrieve and process core dumps, coredumpctl + tool is provided. Here are some examples of frequently used commands: + + + + + coredumpctl -r: lists all core dumps in + reversed chronological order. + + + coredumpctl -1 info: show the information + of the last core dump. + + + coredumpctl -1 debug: load the last core + dump into GDB. + + + + + 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 + /etc/systemd/coredump.conf.d. + For example: + +mkdir -pv /etc/systemd/coredump.conf.d + +cat > /etc/systemd/coredump.conf.d/maxuse.conf << EOF +[Coredump] +MaxUse=5G +EOF + + See systemd-coredump(8), + coredumpctl(1), and + coredump.conf.d(5) manual pages for more + information. + + Long Running Processes -- cgit v1.2.3-54-g00ecf