<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<br>
<br>
On 26.05.2011 14:31, SADA SIVA REDDY S wrote:
<blockquote
cite="mid:BANLkTikZCT-cpUbqyNw98jrQOcJ-b_0Qvw@mail.gmail.com"
type="cite"><span style="font-family: tahoma,sans-serif;"></span><span
style="font-family: tahoma,sans-serif;">My Questions:</span><br
style="font-family: tahoma,sans-serif;">
<ol style="font-family: tahoma,sans-serif;">
<li>Is there a provision in Linux to automatically cleanup the
old corefiles when we reach a certain limit ? <br>
</li>
</ol>
</blockquote>
I think there is no such feature. Core dump is regular file saved
in default process directory, and system doesn't trace these files,
it simply generates core dump and forget about it (on other words,
system treats core dumps as regular file and doesn't know that is a
core dump file).<br>
<blockquote
cite="mid:BANLkTikZCT-cpUbqyNw98jrQOcJ-b_0Qvw@mail.gmail.com"
type="cite">
<ol style="font-family: tahoma,sans-serif;">
<li>Is there a provision in Linux to set a upper limit for space
occupied by all core files (not individual core files) ?</li>
</ol>
</blockquote>
I think no, you can limit size of generated core dump per file, per
user (ulimit -c).<br>
<br>
<br>
But, you can change destination of all core dump files by add line <br>
<br>
kernel.core_pattern = /vol/allcoredumps/%u/%e
<br>
<br>
in /etc/sysctl.conf<br>
<br>
<br>
After that, you can write a simple script to check amount of free
space, schedule it into crontab. When free space will be below
certain limit, script should remove oldest or biggest files from
above location.<br>
<br>
Below, list of available patterns:<br>
<code><br>
%p: pid<br>
%: '%' is dropped<br>
%%: output one '%'<br>
%u: uid<br>
%g: gid<br>
%s: signal number<br>
%t: UNIX time of dump<br>
%h: hostname<br>
%e: executable filename<br>
%: both are dropped</code><br>
<br>
<pre wrap="">--
regards
Andrzej Kardas
<a class="moz-txt-link-freetext" href="http://www.linux.mynotes.pl">http://www.linux.mynotes.pl</a>
</pre>
<br>
</body>
</html>