From nobody@FreeBSD.org  Sat Jul 28 05:20:18 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 B87CA37B405
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 28 Jul 2001 05:20:17 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f6SCKH359143;
	Sat, 28 Jul 2001 05:20:17 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200107281220.f6SCKH359143@freefall.freebsd.org>
Date: Sat, 28 Jul 2001 05:20:17 -0700 (PDT)
From: Igor M Podlesny <poige@morning.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: netstat -i gives no respect to -f, -p despite of man describe it as giving...
X-Send-Pr-Version: www-1.0

>Number:         29276
>Category:       misc
>Synopsis:       netstat -i gives no respect to -f, -p despite of man describe it as giving...
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 28 05:30:00 PDT 2001
>Closed-Date:    Fri Aug 10 04:03:06 PDT 2001
>Last-Modified:  Fri Aug 10 04:10:01 PDT 2001
>Originator:     Igor M Podlesny
>Release:        4.3-STABLE
>Organization:
Morning Network
>Environment:
FreeBSD myhost 4.3-STABLE FreeBSD 4.3-STABLE #0: Thu Jul 26 19:14:13 KRAST 2001
and so on...
>Description:
man 8 netstat says (in -i paragraph) that
"...if the -f address_family option (with the -s option) or the -p
protocol option is present, show per-interface statistics on all
interfaces for the specfied address_family or protocol, respectively..."
in fact it doesn't.
>How-To-Repeat:
You may use diff <(netstat -n -f inet -i) <(netstat -n -i)
and it won't give and difference hence...

>Fix:
Re-writing either netstat or it's man page. May be even them both,
cause they both are really out of sync with reality.
(for e.g., netstat -abadopt gives the "usage" and "usage" says
nothing bout -i)

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: roam 
Responsible-Changed-When: Sun Jul 29 07:05:50 PDT 2001 
Responsible-Changed-Why:  
Wasn't Ruslan working on something similar in -current? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29276 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Fri Aug 10 04:03:06 PDT 2001 
State-Changed-Why:  
Asked and answered. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29276 

From: Ruslan Ermilov <ru@FreeBSD.ORG>
To: Igor M Podlesny <poige@morning.ru>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: misc/29276: netstat -i gives no respect to -f, -p despite of man describe it as giving...
Date: Fri, 10 Aug 2001 14:00:41 +0300

 On Sat, Jul 28, 2001 at 05:20:17AM -0700, Igor M Podlesny wrote:
 > 
 > man 8 netstat says (in -i paragraph) that
 > "...if the -f address_family option (with the -s option) or the -p
 > protocol option is present, show per-interface statistics on all
 > interfaces for the specfied address_family or protocol, respectively..."
 > in fact it doesn't.
 
 In the paragraph you quoted, there is the mention of the -s option.
 The -f and -p are only supported with -i if -s is also specified.
 Manpage has not been clear about that, and has since been fixed.
 
 Basically, there are four displays (except others):
 
 1.  Protocol control blocks (PCB) display.
 2.  Protocol statistics display. (-s)
 3.  Interface statistics display. (-i)
 4.  Per-interface protocol statistics display. (-i -s)
 
 All of the above except 3) can be limited to a particular
 protocol family (-f) or a single protocol (-p).
 
 Some examples would be:
 
 1.  netstat -f inet    -- show PCBs of all INET protocols
 2.  netstat -p udp     -- show PCB of UDP protocol only (NEW!)
 3.  netstat -s         -- show protocol statistics for all families
 4.  netstat -s -f inet -- show INET protocols statistics
 5.  netstat -s -p icmp -- show ICMP protocol statistics
 
 
 Cheers,
 -- 
 Ruslan Ermilov		Oracle Developer/DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
>Unformatted:
