From owner-freebsd-bugs Tue Oct 1 11:22:23 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4171237B401 for ; Tue, 1 Oct 2002 11:22:21 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75F6F43E6E for ; Tue, 1 Oct 2002 11:22:20 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.3/8.12.3) with ESMTP id g91IMIs7022754; Tue, 1 Oct 2002 11:22:18 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.3/8.12.3/Submit) id g91IMIWo022753; Tue, 1 Oct 2002 11:22:18 -0700 Date: Tue, 1 Oct 2002 11:22:18 -0700 From: Brooks Davis To: Bruce Evans Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/43434: New option to 'dmesg' which allow to display or not old boot messages Message-ID: <20021001112217.A19820@Odin.AC.HMC.Edu> References: <200210011710.g91HA6AC022255@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200210011710.g91HA6AC022255@freefall.freebsd.org>; from bde@zeta.org.au on Tue, Oct 01, 2002 at 10:10:06AM -0700 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 01, 2002 at 10:10:06AM -0700, Bruce Evans wrote: >=20 > What's wrong with ``grep [-C] /var/log/messages'' then? :-) > (except it doesn't handled rotated log files or races with newsyslog ...= ). > It handles rotation a bit better than dmesg -- my message buffer gets > rotated by debugging cruft and doesn't keep boot messages for long. > Some magic would be required to find the last message without tags. > Printing only the very last message doesn't seem very useful anyway. > Lastness depends on an arbitrary descision about where the boot ends. 99+% of the time when a user types dmesg what they really want to see is: Copyright (c) 1992-2002 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.0-CURRENT #2: Thu Sep 26 14:33:02 PDT 2002 root@minya.sea.one-eyed-alien.net:/usr/obj/usr/src/sys/GENERIC Preloaded elf kernel "/boot/kernel/kernel" at 0xc06ca000. Preloaded elf module "/boot/kernel/snd_maestro3.ko" at 0xc06ca0a8. =2E.. For the _current_ boot. They couldn't care less about previous boots unless they are looking for a message to diagnose a crash. Currently if you don't have extra debugging stuff on and you don't generate a lot of errors, you typicaly find boot messages repeated several times, especialy in -stable. Thus you have to carefully scroll though the whole list to find the current boot. This change makes dmesg do what the user wants, but allows access to the previous messages in the unlikely event they are needed. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9mefZXY6L6fI4GtQRAj29AJ9ysTsMBmd33E3cCikuGRG5mKKETACfSYzy Sd+II7gKfXiqTYGyVqcjVu4= =OmZx -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message