From 246ba4aaa9bfa8bafcdba229d7324ca02d660155 Mon Sep 17 00:00:00 2001 From: Peter Mattern Date: Mon, 16 May 2016 11:56:04 +0200 Subject: coredump: Improve man pages --- man/systemd-coredump.xml | 98 ++++++++++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 40 deletions(-) (limited to 'man/systemd-coredump.xml') diff --git a/man/systemd-coredump.xml b/man/systemd-coredump.xml index 51dc27e8d3..a28dc62e5a 100644 --- a/man/systemd-coredump.xml +++ b/man/systemd-coredump.xml @@ -47,7 +47,7 @@ systemd-coredump systemd-coredump.socket systemd-coredump@.service - Log and store core dumps + Acquire, save and process core dumps @@ -58,59 +58,76 @@ Description + systemd-coredump is a system service that can acquire core dumps + from the kernel and handle them in various ways. - systemd-coredump can be used as a helper - binary by the kernel when a user space program receives a fatal - signal and dumps core. For it to be used in this capacity, it must - be specified by the - kernel.core_pattern sysctl8 - setting. The syntax of this setting is explained in - core5. - Systemd installs /usr/lib/sysctl.d/50-coredump.conf which configures - kernel.core_pattern to invoke systemd-coredump. - This file may be masked or overridden to use a different setting following normal - sysctl.d5 - rules. - - The behavior of a specific program upon reception of a - signal is governed by a few factors which are described in detail - in core5. - In particular, the coredump will only be processed when the - related resource limits are high enough. For programs started by - systemd, those may be set using - LimitCore= (see - systemd.exec5). + Core dumps can be written to the journal or saved as a file. Once saved they can be retrieved + for further processing, for example in + gdb1. - The behaviour of systemd-coredump is configured through - /etc/systemd/coredump.conf and other configuration files. See - coredump.conf5 - for details. By default, systemd-coredump will log the coredump including a - backtrace if possible, and store the core (contents of process' memory contents) in an external - file on disk in /var/lib/systemd/coredump. + By default, systemd-coredump will log the core dump including a backtrace + if possible to the journal and store the core dump itself in an external file in + /var/lib/systemd/coredump. - When the kernel invokes systemd-coredump to handle a coredump, + When the kernel invokes systemd-coredump to handle a core dump, it will connect to the socket created by the systemd-coredump.socket unit, which in turn will spawn a systemd-coredump@.service instance - to process the coredump. Hence systemd-coredump.socket + to process the core dump. Hence systemd-coredump.socket and systemd-coredump@.service are helper units which do the actual - processing of coredumps and are subject to normal service management. + processing of core dumps and are subject to normal service management. - The log entry and a backtrace are stored in the journal, and can be viewed with - journalctl1. - coredumpctl1 - may be used to list and extract coredumps or load them in - gdb1. + The behavior of a specific program upon reception of a signal is governed by a few + factors which are described in detail in + core5. + In particular, the core dump will only be processed when the related resource limits are sufficient. + - The coredump helper is invoked anew each time. Therefore, any configuration - changes will take effect on the invocation of systemd-coredump. + + Configuration + For programs started by systemd process resource limits can be set by directive + LimitCore=, see + systemd.exec5. + + + In order to be used systemd-coredump must be configured in + sysctl8 + parameter kernel.core_pattern. The syntax of this parameter is explained in + core5. + Systemd installs the file /usr/lib/sysctl.d/50-coredump.conf which configures + kernel.core_pattern accordingly. This file may be masked or overridden to use a different + setting following normal + sysctl.d5 + rules. If the sysctl configuration is modified, it must be updated in the kernel before it takes effect, see - systemd-sysctl8 + sysctl8 and - sysctl8. + systemd-sysctl8. + + The behaviour of systemd-coredump itself is configured through the configuration file + /etc/systemd/coredump.conf and corresponding snippets + /etc/systemd/coredump.conf.d/*.conf, see + coredump.conf5. A new + instance of systemd-coredump is invoked upon receiving every core dump. Therefore, changes + in these files will take effect the next time a core dump is received. + + Resources used by core dump files are restricted in two ways. Parameters like maximum size of acquired + core dumps and files can be set in files /etc/systemd/coredump.conf and snippets mentioned + above. In addition the storage time of core dump files is restricted by systemd-tmpfiles, + corresponding settings are by default in /usr/lib/tmpfiles.d/systemd.conf. + + + + Usage + Data stored in the journal can be viewed with + journalctl1 + as usual. + coredumpctl1 + can be used to retrieve saved core dumps independent of their location, to display information and to process + them e.g. by passing to the GNU debugger (gdb). @@ -119,6 +136,7 @@ coredump.conf5, coredumpctl1, systemd-journald.service8, + systemd-tmpfiles8, core5, sysctl.d5, systemd-sysctl.service8. -- cgit v1.2.3-54-g00ecf