NetBSD Problem Report #43968

From yasuoka@iij.ad.jp  Thu Oct 14 07:46:32 2010
Return-Path: <yasuoka@iij.ad.jp>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 7644863BBD6
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 14 Oct 2010 07:46:32 +0000 (UTC)
Message-Id: <20101014.154423.30955736.yasuoka@iij.ad.jp>
Date: Thu, 14 Oct 2010 15:44:23 +0900 (JST)
From: YASUOKA Masahiko <yasuoka@iij.ad.jp>
Reply-To: yasuoka@iij.ad.jp
To: gnats-bugs@gnats.NetBSD.org
Subject: add "segqlen" to tcp_dump of netstat(1)

>Number:         43968
>Category:       bin
>Synopsis:       add "segqlen" to tcp_dump of netstat(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 14 07:50:01 +0000 2010
>Closed-Date:    Tue Oct 04 21:45:31 +0000 2011
>Last-Modified:  Tue Oct 04 21:45:31 +0000 2011
>Originator:     yasuoka@iij.ad.jp
>Release:        NetBSD 5.0.1
>Organization:
Internet Initiative Japan Inc.
>Environment:
System: NetBSD yasuoka-nb.iij.ad.jp 5.0.1 NetBSD 5.0.1 (GENERIC) #0: Thu Jul 30
01:39:11 UTC 2009 builds@b8.netbsd.org:/home/builds/ab/netbsd-5-0-1-RELEASE/i386
/200907292356Z-obj/home/builds/ab/netbsd-5-0-1-RELEASE/src/sys/arch/i386/compile
/GENERIC i386
Architecture: i386
Machine: i386
>Description:

Usage of TCP segment queue is useful for debugging.
The diff is to add 'segqlen' of TCPCB to 'netstat -P'.

>How-To-Repeat:
>Fix:
Index: inet.c
===================================================================
RCS file: /cvsroot/NetBSD/src/usr.bin/netstat/inet.c,v
retrieving revision 1.92
diff -u -p -r1.92 inet.c
--- inet.c	7 Dec 2009 18:48:45 -0000	1.92
+++ inet.c	14 Oct 2010 05:06:55 -0000
@@ -946,8 +946,8 @@ tcp_dump(u_long pcbaddr)

 	printf("rxtshift %d, rxtcur %d, dupacks %d\n", tcpcb.t_rxtshift,
 	    tcpcb.t_rxtcur, tcpcb.t_dupacks);
-	printf("peermss %u, ourmss %u, segsz %u\n\n", tcpcb.t_peermss,
-	    tcpcb.t_ourmss, tcpcb.t_segsz);
+	printf("peermss %u, ourmss %u, segsz %u, segqlen %u\n\n",
+	    tcpcb.t_peermss, tcpcb.t_ourmss, tcpcb.t_segsz, tcpcb.t_segqlen);

 	printf("snd_una %u, snd_nxt %u, snd_up %u\n",
 	    tcpcb.snd_una, tcpcb.snd_nxt, tcpcb.snd_up);

>Release-Note:

>Audit-Trail:
From: "Sergey Svishchev" <shattered@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43968 CVS commit: src/usr.bin/netstat
Date: Tue, 4 Oct 2011 21:12:40 +0000

 Module Name:	src
 Committed By:	shattered
 Date:		Tue Oct  4 21:12:40 UTC 2011

 Modified Files:
 	src/usr.bin/netstat: inet.c

 Log Message:
 PR/43968 -- add 'segqlen' of TCPCB to 'netstat -P'.

 OK by wiz@


 To generate a diff of this commit:
 cvs rdiff -u -r1.99 -r1.100 src/usr.bin/netstat/inet.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: shattered@NetBSD.org
State-Changed-When: Tue, 04 Oct 2011 21:45:31 +0000
State-Changed-Why:
Patch committed, thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.