[Gllug] handling core files on linux

Ben Fitzgerald ben_m_f at yahoo.co.uk
Fri Feb 25 13:37:26 UTC 2005


Hi,

I'd like to ask how others deal with core files.

My understanding is that /proc/sys/kernel/core_pattern is the
one place to set core filename patterns. When an application
terminates abnormally, if the session that began the process
has a core limit set to 'unlimited', the kernel will dump the
core file to core_pattern. I guess this is because the kernel
handles the abnormal termination, so local variable are out
the window by this stage.

e.g core_pattern is /cores/%u/%e.%p

user1 starts process dodgyexec in a shell where ulimit -c
is 'unlimited'. the pid is 1234. /cores/user1 exists and is
writable by user1.

dodgyexec aborts and a core file is written to
/cores/user1/dodgyexec.1234

is there any way to alter, on a per user basis, where a core
file gets dumped to? On solaris there is a little more flexibility
in that one can specify 'global core file pattern' and 'init core
file pattern'.

granted by setting /cores to root:root 755 I can limit who can
write cores to /cores/%u/ by creating or not creating directories
for each user.

look forward to hearing your ideas.

thanks,

ben
-- 
Registered Linux user number 339435
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list