Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Jan 2007 13:20:03 -0500
From:      Michael Proto <mike@jellydonut.org>
To:        Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>, freebsd-stable@freebsd.org
Subject:   Re: Interrupt (SCSI?) hang on 4.x
Message-ID:  <459AA253.20603@jellydonut.org>
In-Reply-To: <20070102180438.GA81454@icarus.home.lan>
References:  <20070102153608.GA78405@icarus.home.lan>	<1167755991.84652.6.camel@buffy.york.ac.uk> <20070102180438.GA81454@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
Jeremy Chadwick wrote:
> Once the machine is hung like described, since running shell
> commands (date/vmstat/even spawning sh itself) involves disk I/O,
> this won't work.  If date and vmstat could be cached in memory
> somewhere, this might work, but I don't know how one would do that.
> (A memory filesystem could work, but pretty much all of / would
> have to be there for this to work...)
> 
> The best I could do would be to have a cronjob or a process running
> in a screen session which does date && vmstat -i over and over to a
> log file, and examine that log once the machine hung like described.
> This wouldn't tell us if the numbers were increasing/fluxuating
> *after* the hang, though.  :-(
> 

You *could* create a small ramdisk, copy /lib into it (along with
/usr/bin/vmstat, /bin/sh, and any other needed utils), then set the
LD_LIBRARAY_PATH to /mnt/lib or wherever the ramdisk is mounted and run
vmstat. If you are already logged-in prior to the hang then utils on the
mfs should run provided all their libraries are also on the mfs.

I use a very similar process on a small Soekris box when I do an
in-place flash upgrade which runs dd over the entire disk (a 32 MB
compact flash card) while the box is still running from the same disk.
My pre-upgrade script copies /sbin/reboot, /bin/dd, /lib/libc.so.6, and
/lib/libutil.so.5 to a small mfs mounted at /mnt and sets
LD_LIBRARY_PATH to /mnt prior to running dd (after which "reboot -lnq"
is run, also from the mfs).


-Proto



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