Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jan 1998 10:27:59 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Hans Petter Bieker <hanspb@persbraten.vgs.no>
Cc:        questions@FreeBSD.ORG, FreeBSD Hackers <hackers@FreeBSD.ORG>
Subject:   Re: Why dump to /var??
Message-ID:  <19980104102759.11459@lemis.com>
In-Reply-To: <Pine.BSF.3.96.980103200655.299A-100000@zerium.newmedia.no>; from Hans Petter Bieker on Sat, Jan 03, 1998 at 08:24:39PM %2B0100
References:  <Pine.BSF.3.96.980103200655.299A-100000@zerium.newmedia.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 03, 1998 at 08:24:39PM +0100, Hans Petter Bieker wrote:
> I got this message after a recent system crash:
> checking for core dump...savecore: reboot after panic: page fault
> savecore: system went down at Sat Jan 3 18:35:32 1998
> savecore: no dump, not enough free space on device
>
> not enough free space? On which device? in my /var/crash directory?

Presumably, unless you've changed /etc/rc.

> How much space does actually this dump need? Equal to the size of my
> swap partition?

Equal to the size of your memory.  It's a memory dump.

> If so.. why dump to /var by default. Most people don't have hundreds
> of mb's free in var? Maybe a comment in /etc/rc.conf about this?

I suppose there's some value in this.  Why don't you enter a PR
suggesting it?  I suspect, however, that a number of core team members
would like to keep it short.  I'm copying -hackers on this message.
Please follow up there.

> Maybe savecore should say something like this:
>
> savecore: /var: no dump, not enough free space on device

Well, one reason not to do this change is the possible symbolic link,
which makes it possible to put /var/crash on some other file system.
The other thing is that savecore almost invariably saves to
/var/crash, so it doesn't add much value.

> Anyone? Any why not send this error msg to syslogd? 

It's not running at this point.

> (This is a good thing if you don't have a serial console.)

Yes, there is some merit in the idea of starting syslogd earlier and
logging *all* the startup messages.  I did it once for a commercial
vendor, and it made looking for errors a lot easier.  If I have time
on my hands, I may have another go.

> Filesystems:
> Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
> /dev/wd0a       31775    18954    10279    65%    /
> /dev/wd0s1f    377238   240884   106175    69%    /usr
> /dev/wd0s1e     29727     3249    24100    12%    /var
> /dev/wd1s1e    808223   494311   249255    66%    /home
> procfs              4        4        0   100%    /proc
>
> Swap:
> Device      1K-blocks     Used    Avail Capacity  Type
> /dev/wd0s1b    174048        0   173984     0%    Interleaved
>
> I have 80 MB ram.

Looking at this configuration, I'd suggest creating a directory
/home/crash and a symlink /var/crash pointing to it.

One thing you should be aware of is that the dump doesn't go away
immediately when you start the system.  It's at the end of the swap
partition, so you can almost invariably manually do a savecore when
the system is up and running and (in your case) not using more than
half the available swap space.

Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980104102759.11459>