← 返回命令列表

Linux command

coredumpctl 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

coredumpctl

Example

coredumpctl list program

Example

coredumpctl info 1234

Debug

coredumpctl debug

Example

coredumpctl debug program

Extract

coredumpctl -o /path/to/file dump program

Example

coredumpctl debug -A "-ex bt"

说明

coredumpctl is a systemd utility for managing core dumps - memory snapshots created when a program crashes. Instead of traditional core dump files scattered across the filesystem, systemd-coredump captures crashes and stores them in the journal with rich metadata including timestamps, process information, and system state. The tool provides a unified interface for working with these captured core dumps. You can list all crashes, filter by program or time range, view detailed information about specific crashes, and launch a debugger to analyze the failure. Core dumps can also be extracted to files for offline analysis or sharing with developers. This centralized approach to core dump management makes it much easier to track down intermittent crashes, debug production issues, and maintain system reliability. The integration with journalctl means crash data is preserved alongside system logs, providing full context for debugging. The tool requires systemd-coredump to be configured as the system's core dump handler, which is the default on most modern systemd-based distributions.

参数

-o, --output FILE
Write dump output to file
-1
Show only the most recent core dump
-S, --since TIME
Filter by start time
-U, --until TIME
Filter by end time
-r, --reverse
Show newest entries first
-F, --field FIELD
Print all values of specified field
-D, --directory DIR
Use journal files from directory
--debugger DEBUGGER
Use specific debugger (default: gdb)
-A, --debugger-arguments ARGS
Pass arguments to debugger
-n, --lines NUM
Number of journal lines to show
-q, --quiet
Suppress informational messages
--json MODE
Output as JSON (short, pretty, off)

FAQ

What is the coredumpctl command used for?

coredumpctl is a systemd utility for managing core dumps - memory snapshots created when a program crashes. Instead of traditional core dump files scattered across the filesystem, systemd-coredump captures crashes and stores them in the journal with rich metadata including timestamps, process information, and system state. The tool provides a unified interface for working with these captured core dumps. You can list all crashes, filter by program or time range, view detailed information about specific crashes, and launch a debugger to analyze the failure. Core dumps can also be extracted to files for offline analysis or sharing with developers. This centralized approach to core dump management makes it much easier to track down intermittent crashes, debug production issues, and maintain system reliability. The integration with journalctl means crash data is preserved alongside system logs, providing full context for debugging. The tool requires systemd-coredump to be configured as the system's core dump handler, which is the default on most modern systemd-based distributions.

How do I run a basic coredumpctl example?

Run `coredumpctl` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -o, --output FILE do in coredumpctl?

Write dump output to file