# /var/crash/ directory full?



## desnudopenguino (Aug 21, 2009)

I've been messing around w/ FreeBSD 7.2-RELEASE on my new build and ran into a problem two days ago...   When booting the machine, it would hang at "Writing crash summary to /var/crash/core.txt.4".  So I tried to reboot a couple more times to no avail (just thought it was being funky).  Then I thought to myself "maybe /var/crash/ is full", I mean... it has 4 core dumps in it, but I thought it would have yelled at me during boot instead of just hanging there.  So I threw in a live cd, and booted with that, no problem.  Then I poked around and figured out which slice had /var on it & cleaned out the crash directory.

I have a question about this... Should the crash directory be cleaned out manually?  I mean obviously it worked (so far) but is this a good practice? or is there some other way to manage the core dumps?


----------



## SirDice (Aug 21, 2009)

desnudopenguino said:
			
		

> or is there some other way to manage the core dumps?


The best way is not to get them in the first place


----------



## Alt (Aug 21, 2009)

You can turn them off at all by adding this


> kern.coredump=0


in /etc/sysctl.conf file


----------



## desnudopenguino (Aug 21, 2009)

SirDice said:
			
		

> The best way is not to get them in the first place


Haha, true but I like to blow things up on occasion 



			
				Alt said:
			
		

> You can turn them off at all by adding this
> 
> 
> > kern.coredump=0
> ...


Thanks for the tip, I'll have to remember it.

I like having the core dumps enabled so that I can try to figure out what's causing stuff to break.  I was just wondering if there's any reason that I should not clear out the /var/crash/ directory.


----------



## ale (Aug 21, 2009)

desnudopenguino said:
			
		

> I was just wondering if there's any reason that I should not clear out the /var/crash/ directory.


Once you have extracted the information from the dumps, you are safe to delete the vmcore.* files.
I can't remember if its now the default (you can check by yourself looking at the size of vmcore files), but to save some space, you can add _debug.minidump=1_ to /etc/sysctl.conf so the vmcore will not be the size of the physical memory.

EDIT:
according to the 7.0 release notes, minidump should now be the default


----------



## TRVLRS (Jul 12, 2012)

*/var/crash*

Please forgive me I have taken over for a previous admin and am still getting to know FreeBSD.
These are the files in my /var/crash directory, my /var is 75% full and I feel I should delete some of these files.

From reading other posts I believe I can delete the vmcore files at the very least.

Thank you very much


```
-rw-r--r--  1 root  wheel          3 Oct 25  2011 bounds
-rw-------  1 root  wheel        468 Jan 26  2009 info.0
-rw-------  1 root  wheel        457 Jan 26  2009 info.1
-rw-------  1 root  wheel        513 Aug 10  2011 info.10
-rw-------  1 root  wheel        513 Aug 14  2011 info.11
-rw-------  1 root  wheel        513 Aug 25  2011 info.12
-rw-------  1 root  wheel        513 Sep 11  2011 info.13
-rw-------  1 root  wheel        512 Sep 25  2011 info.14
-rw-------  1 root  wheel        513 Sep 27  2011 info.15
-rw-------  1 root  wheel        513 Oct 25  2011 info.16
-rw-------  1 root  wheel        457 Jan 26  2009 info.2
-rw-------  1 root  wheel        468 Jan 26  2009 info.3
-rw-------  1 root  wheel        467 Jan 26  2009 info.4
-rw-------  1 root  wheel        493 Jan 26  2009 info.5
-rw-------  1 root  wheel        467 Jan 26  2009 info.6
-rw-------  1 root  wheel        467 Jan 27  2009 info.7
-rw-------  1 root  wheel        467 Jan 27  2009 info.8
-rw-------  1 root  wheel        512 Aug  6  2011 info.9
-rw-r--r--  1 root  wheel          5 Jan  1  2009 minfree
-rw-------  1 root  wheel  129515520 Aug 10  2011 vmcore.10
-rw-------  1 root  wheel  125325312 Aug 14  2011 vmcore.11
-rw-------  1 root  wheel  137674752 Aug 25  2011 vmcore.12
-rw-------  1 root  wheel  136654848 Sep 11  2011 vmcore.13
-rw-------  1 root  wheel  132464640 Sep 25  2011 vmcore.14
-rw-------  1 root  wheel  123527168 Sep 27  2011 vmcore.15
-rw-------  1 root  wheel  133545984 Oct 25  2011 vmcore.16
-rw-------  1 root  wheel  139333632 Aug  6  2011 vmcore.9
```


----------



## jb_fvwm2 (Jul 13, 2012)

Unless you need them for debugging...

```
cd /var
/bin/rm -rf crash
mkdir crash
```
I often delete all files in a directory that way.


----------



## maxum (Jul 13, 2012)

You crash too much, I would say "lol", but it's disallowed... 
(sorry I broke a rule)


----------

