From owner-freebsd-current@FreeBSD.ORG Tue Mar 4 12:17:13 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EFF71065671 for ; Tue, 4 Mar 2008 12:17:13 +0000 (UTC) (envelope-from ianf@clue.co.za) Received: from munchkin.clue.co.za (munchkin.clue.co.za [66.219.59.160]) by mx1.freebsd.org (Postfix) with ESMTP id 5FF8D8FC27 for ; Tue, 4 Mar 2008 12:17:13 +0000 (UTC) (envelope-from ianf@clue.co.za) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=20070313; d=clue.co.za; h=Received:Received:Received:To:cc:From:Subject:In-Reply-To:X-Attribution:Date:Message-Id; b=hvsdxvREjzQSEwtISv7na1ZfxsahzD9d0iHVG9d3krlhgADpnAx1qUQ2DtlaumEQKh4cvMxwjGEyH6sMk2cXD+VCy1R1tpGuLkCQh6tGuo1HFN2eztADocvAMrONIkPa2ATvPU7SNrASlEeCRu18he9L2BtVD3jD6TGSXarqIUbecx4NMh71tSimDe45x71NbALsD6PA788LseQ5QZLmsgIbx/JKDsbkbCRB/rqEphT25idNpM8iVtaE/0yTL+mk; Received: from uucp by munchkin.clue.co.za with local-rmail (Exim 4.67) (envelope-from ) id 1JWW51-0000dJ-1K; Tue, 04 Mar 2008 12:17:11 +0000 Received: from ianf.clue.co.za ([10.0.0.6] helo=clue.co.za) by urchin.clue.co.za with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1JWW4P-0003Pb-3N; Tue, 04 Mar 2008 12:16:33 +0000 Received: from localhost ([127.0.0.1] helo=clue.co.za) by clue.co.za with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1JWW4N-00013Q-UN; Tue, 04 Mar 2008 14:16:31 +0200 To: Peter Jeremy From: Ian FREISLICH In-Reply-To: Message from Peter Jeremy of "Fri, 29 Feb 2008 17:58:35 +1100." <20080229065835.GR83599@server.vk2pj.dyndns.org> X-Attribution: BOFH Date: Tue, 04 Mar 2008 14:16:31 +0200 Message-Id: Cc: Barney Cordoba , current@freebsd.org Subject: Re: netstat output issue X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 12:17:13 -0000 Peter Jeremy wrote: > > --IjNIXuzrMEaOuFwn > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > On Thu, Feb 28, 2008 at 02:18:45PM -0800, Barney Cordoba wrote: > >When using bridging, netstat apparently can only > >display 5 characters, so "bridge" is shown as the > >route. > > If you're talking about 'netstat -i', try 'netstat -iW'. '-W' is marginally better, but in reality "wider" is only really 2 characters wider: [firewall2.cpt1] ~ $ netstat -iWI vlan2001_vrrp Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll vlan200 1500 1 0 2699257 1 0 vlan200 1500 xxx.xx.xx.xx/ xxx.xx.xx.xx 182642 - 0 - - It will help Barney, but it doesn't always help. This patch helps my situation for the '-i' case: RCS file: /home/ncvs/src/usr.bin/netstat/if.c,v retrieving revision 1.69 diff -u -d -r1.69 if.c --- if.c 16 Jul 2007 17:15:54 -0000 1.69 +++ if.c 4 Mar 2008 12:13:48 -0000 @@ -222,7 +222,7 @@ if (!pfunc) { if (Wflag) - printf("%-7.7s", "Name"); + printf("%-13.13s", "Name"); else printf("%-5.5s", "Name"); printf(" %5.5s %-13.13s %-17.17s %8.8s %5.5s", @@ -291,7 +291,7 @@ if (ifaddraddr == 0) { if (Wflag) - printf("%-7.7s", name); + printf("%-13.13s", name); else printf("%-5.5s", name); printf(" %5lu ", ifnet.if_mtu); @@ -312,7 +312,7 @@ continue; } if (Wflag) - printf("%-7.7s", name); + printf("%-13.13s", name); else printf("%-5.5s", name); printf(" %5lu ", ifnet.if_mtu); -- Ian Freislich