From nobody@FreeBSD.org  Sat Apr 21 07:45:02 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id E826437B42C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 21 Apr 2001 07:45:01 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f3LEj1640475;
	Sat, 21 Apr 2001 07:45:01 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200104211445.f3LEj1640475@freefall.freebsd.org>
Date: Sat, 21 Apr 2001 07:45:01 -0700 (PDT)
From: td@ii.uib.no
To: freebsd-gnats-submit@FreeBSD.org
Subject: dmesg only prints the last couple of lines of the message buffer
X-Send-Pr-Version: www-1.0

>Number:         26746
>Category:       bin
>Synopsis:       dmesg only prints the last couple of lines of the message buffer
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 21 07:50:03 PDT 2001
>Closed-Date:    Thu Jan 17 08:12:05 PST 2002
>Last-Modified:  Thu Jan 17 08:42:35 PST 2002
>Originator:     Trond Davidsen
>Release:        4.3-RC
>Organization:
University of Bergen
>Environment:
FreeBSD uib-vpn-gw.uib.no 4.3-RC FreeBSD 4.3-RC #0: Thu Apr 19 14:49:54 CEST 2001     root@uib-vpn-gw.uib.no:/usr/obj/usr/src/sys/VPN-GW  i386
>Description:
The dmesg only prints the last couple of lines from the message buffer, 
and the first line is only partially printed.

uib-vpn-gw# dmesg
p3
arplookup 192.168.0.1 failed: host is not on local network
arplookup 192.168.0.1 failed: host is not on local network
arplookup 192.168.0.1 failed: host is not on local network
arplookup 192.168.0.1 failed: host is not on local network
arplookup 192.168.0.1 failed: host is not on local network
uib-vpn-gw#

This is the rcsid of the dmesg with the trouble:
"$FreeBSD: src/sbin/dmesg/dmesg.c,v 1.11.2.1 2001/01/12 12:40:28 phk Exp $";

Copying an older dmesg from another box with the following rcsid,
fixes the problem:

"$FreeBSD: src/sbin/dmesg/dmesg.c,v 1.11 1999/08/28 00:12:36 peter Exp $";

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: dd 
State-Changed-When: Sat Apr 28 20:00:41 PDT 2001 
State-Changed-Why:  
Did you try the -a option? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26746 

From: Trond Davidsen <trond.davidsen@ii.uib.no>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/26746: dmesg only prints the last couple of lines of the message 
 buffer
Date: Sun, 29 Apr 2001 15:03:50 +0200

 dmesg -a gives the expected output (~450 lines).  But I can't see
 anything in the man page that explains why I get only ~3 lines when I
 use dmesg without any commandline options.
 
 Trond

From: Bruce Evans <bde@zeta.org.au>
To: Trond Davidsen <trond.davidsen@ii.uib.no>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: bin/26746: dmesg only prints the last couple of lines of the
 message  buffer
Date: Mon, 30 Apr 2001 10:36:45 +1000 (EST)

 On Sun, 29 Apr 2001, Trond Davidsen wrote:
 
 >  dmesg -a gives the expected output (~450 lines).  But I can't see
 >  anything in the man page that explains why I get only ~3 lines when I
 >  use dmesg without any commandline options.
 
 Maybe there is on 3 lines left after removing the extras printed by -a.
 
 ISTR seeing this behaviour while using dmesg in single user mode.  This
 seemed to be caused by the message buffer filling up and either the
 internal wrap-around not working or dmesg not understanding the wrap-
 around.
 
 Bruce
 

From: Trond Davidsen <trond.davidsen@ii.uib.no>
To: Bruce Evans <bde@zeta.org.au>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: bin/26746: dmesg only prints the last couple of lines of themessage  
 buffer
Date: Mon, 30 Apr 2001 15:43:38 +0200

 > 
 > ISTR seeing this behaviour while using dmesg in single user mode.  This
 > seemed to be caused by the message buffer filling up and either the
 > internal wrap-around not working or dmesg not understanding the wrap-
 > around.
 > 
 > Bruce
 
 This box is used as a vpn server, with lots of ipfw logging, so the
 message buffer has definitly wraped around.  I think both of the
 scenarios you mention is wrong, and either should be documented, or
 dmesg should be fixed to give the pre -a behaviour when called without
 parameters.
 
 Trond
State-Changed-From-To: feedback->closed 
State-Changed-By: sheldonh 
State-Changed-When: Thu Jan 17 08:12:05 PST 2002 
State-Changed-Why:  
Automatic feedback timeout.  If additional feedback that warrants 
the re-opening of this PR is available but not included in the 
audit trail, please include the feedback in a reply to this message 
(preserving the Subject line) and ask that the PR be re-opened. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26746 
>Unformatted:
