Quick Linux Tip #92:
Question: A process is misbehaving. Can I dump its memory for post-mortem analysis?
Try: sudo gcore -o /tmp/mysqld_dump 3456
Info: gcore generates a core dump of a running process without terminating it. The resulting core snapshot can be analyzed offline using gdb.
Examples:
- $
sudo gcore 3456# Dumps process memory to current working directory - $
coredumpctl list# List historical system core dumps - $
coredumpctl debug 3456# Load crash core directly into gdb debugger
Note: Core dumps equal full process RAM usage and can be large—compress with gzip. Meaningful stack traces require matching binaries and unstripped debug symbols.
Leave a Reply