Skip to main content

3 posts tagged with "coredump"

View All Tags

coredump related settings

· One min read

1. coredump limits

  • for this login time
ulimits -c unlimited
  • for the permanent time
vim /etc/security/limits.conf

* soft core unlimited
* hard core unlimited

2. coredump file path

sudo sysctl -w kernel.core_pattern="|/tmp/core_dump_example.py %e"

man core for the details about % part like %e in coredump file name

3. generating coredump

kill -SIGSEGV ${PID}

generate coredump for docker container

· One min read
  • use --cap-add=SYS_PTRACE flag when running the container
docker run --cap-add=SYS_PTRACE ...
  • add it to a docker-compose file
version: '3'
services:
your-service:
image: your-image
cap_add:
- SYS_PTRACE