svn commit: r244320 - head/sbin/savecore

John Baldwin jhb at freebsd.org
Tue Dec 18 20:44:52 UTC 2012


On Sunday, December 16, 2012 6:06:12 pm Pawel Jakub Dawidek wrote:
> Author: pjd
> Date: Sun Dec 16 23:06:12 2012
> New Revision: 244320
> URL: http://svnweb.freebsd.org/changeset/base/244320
> 
> Log:
>   Implement -m option to savecore(8) that allows to limit number of kernel
>   dumps stored. Once the limit is reached it restarts from 0.

Why restart at zero?  The old behavior is that if you rm'd /var/crash/vmcore.0 
then new dumps would just get increasing numbers.  That seems fine (just 
delete the "oldest" core dumps if you are out of room).  I guess the 
restarting lets you be lazy and avoid finding the "oldest" dump via a glob, 
but:

The real feature request was not a limit on the number of core dumps IIRC, but 
a way to specify a minimum amount of free space in the partition and to delete 
tne oldest dump if the new dump would put the partition over the limit.  To do 
this you have to be able to find the "oldest" dump, so if you solve this you 
no longer have to rely on rotating names (and no longer need a 'last' link).

-- 
John Baldwin


More information about the svn-src-head mailing list