Check out my first novel, midnight's simulacra!

Core: Difference between revisions

From dankwiki
(Created page with '==FreeBSD== * kern.corefile=/data/cores/%N-%U-%P.core * kern.sugid_coredump=1')
 
No edit summary
Line 1: Line 1:
* Produce a corefile for a running process with <tt>gcore</tt>(1)
* The RLIMIT_CORE [[rlimit]] specifies the maximum size of a corefile (use 0 to disable corefile generation)
==FreeBSD==
==FreeBSD==
* kern.corefile=/data/cores/%N-%U-%P.core
* sysctl <tt>kern.corefile</tt> controls naming mechanisms. See the <tt>core(5)</tt> man page.
* kern.sugid_coredump=1
* sysctl kern.sugid_coredump controls whether processes with different effective and real U/GIDs produce corefiles
* See savecore(8) and crashinfo(8) for further FreeBSD-specific capabilities
 
==Linux==
* /proc/sys/kernel/core_pattern allows core naming to be configured (since Linux 2.6 and 2.4.21), and corefiles to be piped to programs. See the <tt>core(5)</tt> man page.
* /proc/sys/kernel/core_uses_pid controls whether the PID is appended to the corefile's name
* The [[Linux APIs|prctl]] flag PR_SET_DUMPABLE allows process-specific coredump generation settings
* /proc/sys/fs/suid_dumpable
* /proc/PID/coredump_filter allows memory map-specific coredump generation settings

Revision as of 04:18, 17 June 2009

  • Produce a corefile for a running process with gcore(1)
  • The RLIMIT_CORE rlimit specifies the maximum size of a corefile (use 0 to disable corefile generation)

FreeBSD

  • sysctl kern.corefile controls naming mechanisms. See the core(5) man page.
  • sysctl kern.sugid_coredump controls whether processes with different effective and real U/GIDs produce corefiles
  • See savecore(8) and crashinfo(8) for further FreeBSD-specific capabilities

Linux

  • /proc/sys/kernel/core_pattern allows core naming to be configured (since Linux 2.6 and 2.4.21), and corefiles to be piped to programs. See the core(5) man page.
  • /proc/sys/kernel/core_uses_pid controls whether the PID is appended to the corefile's name
  • The prctl flag PR_SET_DUMPABLE allows process-specific coredump generation settings
  • /proc/sys/fs/suid_dumpable
  • /proc/PID/coredump_filter allows memory map-specific coredump generation settings