From owner-freebsd-questions Thu May 10 10:26:40 2001 Delivered-To: freebsd-questions@freebsd.org Received: from pc89225.stofanet.dk (pc89225.stofanet.dk [212.10.22.225]) by hub.freebsd.org (Postfix) with ESMTP id 5093E37B423 for ; Thu, 10 May 2001 10:26:34 -0700 (PDT) (envelope-from morten@hotpost.dk) Received: (from morten@localhost) by pc89225.stofanet.dk (8.9.3/8.9.3/Debian 8.9.3-21) id TAA08370 for freebsd-questions@freebsd.org; Thu, 10 May 2001 19:26:33 +0200 From: morten@hotpost.dk Date: Thu, 10 May 2001 19:26:33 +0200 To: freebsd-questions@freebsd.org Subject: Re: dmesg buffer between reboots Message-ID: <20010510192633.B560@hotpost.dk> References: <200105100308.XAA01149@scarlet.my.domain> <001b01c0d952$246e54d0$0701a8c0@darryl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <001b01c0d952$246e54d0$0701a8c0@darryl>; from darryl@osborne-ind.com on Thu, May 10, 2001 at 08:07:17AM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 10, maj, 2001 at 08:07:17 -0500, Darryl Hoar wrote: > dmesg > dmesg_sav. Puts the contents into a file name for > preservation. The question then becomes, how to automate > it so that it is done everytime before shutdown. I've been using this in /etc/rc.local (on OpenBSD though, but should be the same on FreeBSD): # writing dmesg to file if [ -x /sbin/dmesg ]; then export BOOT_TIME=$(date "+%Y-%m-%d_%H:%M:%S"); echo -n ' dmesg'; /sbin/dmesg > \ /var/log/dmesg/dmesg_$BOOT_TIME; gzip -9 \ /var/log/dmesg/dmesg_$BOOT_TIME fi -- lynx -source http://home1.stofanet.dk/liebach/pgpkey.html | gpg --import - UNIX, reach out and grep someone! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message