From owner-freebsd-hackers Sat Jan 3 15:58:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA12515 for hackers-outgoing; Sat, 3 Jan 1998 15:58:18 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA12502; Sat, 3 Jan 1998 15:58:05 -0800 (PST) (envelope-from grog@lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.8.7/8.8.5) with ESMTP id KAA20602; Sun, 4 Jan 1998 10:28:00 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id KAA07265; Sun, 4 Jan 1998 10:27:59 +1030 (CST) (envelope-from grog) Message-ID: <19980104102759.11459@lemis.com> Date: Sun, 4 Jan 1998 10:27:59 +1030 From: Greg Lehey To: Hans Petter Bieker Cc: questions@FreeBSD.ORG, FreeBSD Hackers Subject: Re: Why dump to /var?? Reply-To: FreeBSD Hackers References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84e In-Reply-To: ; from Hans Petter Bieker on Sat, Jan 03, 1998 at 08:24:39PM +0100 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk 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