History log of /freebsd-10.0-release/usr.bin/netstat/netstat.1
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 253275 12-Jul-2013 hrs

Add -F fibnum option to specify an FIB number for -r flag.


# 248114 09-Mar-2013 melifaro

Add forgotten .El

MFC with: r248112


# 248112 09-Mar-2013 melifaro

Document netstat -Q flags meaning.

MFC after: 1 week


# 216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 215434 17-Nov-2010 gnn

Add new, per connection, statistics for TCP, including:
Retransmitted Packets
Zero Window Advertisements
Out of Order Receives

These statistics are available via the -T argument to
netstat(1).
MFC after: 2 weeks


# 204207 22-Feb-2010 rwatson

Update date on netstat(1) for -Q.

Suggested by: bz
MFC after: 1 week


# 204202 22-Feb-2010 rwatson

Teach netstat(1) to print out netisr statistics when given the -Q argument.
Currently supports only reporting on live systems via sysctl, kmem support
needs to be edded.

MFC after: 1 week
Sponsored by: Juniper Networks


# 202060 11-Jan-2010 delphij

Add a new option, -q howmany, which when used in conjuction with -w,
exits netstat after _howmany_ outputs.

Requested by: thomasa
Reviewed by: freebsd-net (bms, old version in early 2007)
MFC after: 1 month


# 199993 01-Dec-2009 jhb

Remove -t from the manpage and usage.


# 197244 16-Sep-2009 silby

Add the ability to see TCP timers via netstat -x. This can be a useful
feature when you have a seemingly stuck socket and want to figure
out why it has not been closed yet.

No plans to MFC this, as it changes the netstat sysctl ABI.

Reviewed by: andre, rwatson, Eric Van Gyzen


# 195502 09-Jul-2009 trasz

Add manual page links to advertise procstat(1) a little better.

Approved by: re (kib)


# 194512 19-Jun-2009 csjp

Implement the -z (zero counters) option for the various bpf counters.
Add necessary changes to the kernel for this (basically introduce a
bpf_zero_counters() function). As well, update the man page.

MFC after: 1 month
Discussed with: rwatson


# 188649 15-Feb-2009 bms

Now that ifmcstat(8) does not suck, retire host-mode netstat -g.
This change will not be back-ported.


# 187037 10-Jan-2009 ru

Fix markup and spelling.


# 179027 15-May-2008 gnn

Update the kernel to count the number of mbufs and clusters
(all types) used per socket buffer.

Add support to netstat to print out all of the socket buffer
statistics.

Update the netstat manual page to describe the new -x flag
which gives the extended output.

Reviewed by: rwatson, julian


# 170492 10-Jun-2007 ceri

Document SCTP support.


# 162792 29-Sep-2006 ru

Markup fixes.


# 153514 18-Dec-2005 csjp

Provide some basic documentation explaining what the bpf(4) flags are
supposed to mean. Also, add an external references for bpf now that we
reference flags from that man page.


# 152568 18-Nov-2005 ru

-mdoc sweep.


# 150636 27-Sep-2005 mlaier

Remove bridge(4) from the tree. if_bridge(4) is a full functional
replacement and has additional features which make it superior.

Discussed on: -arch
Reviewed by: thompsa
X-MFC-after: never (RELENG_6 as transition period)


# 149862 07-Sep-2005 csjp

Merge bpfstat's functionality into the netstat(1) utility. This adds
a -B option which causes bpf peers to be printed. This option can be
used in conjunction with -I if information about specific interfaces
is desired. This is similar to what NetBSD added to their version of
netstat.

$ netstat -B
Pid Netif Flags Recv Drop Match Sblen Hblen Command
1137 lo0 p--s-- 0 0 0 0 0 tcpdump
205 sis0 -ifs-l 37331 0 1 0 0 dhclient
$

$ netstat -I lo0 -B
Pid Netif Flags Recv Drop Match Sblen Hblen Command
1174 lo0 p--s-- 0 0 0 0 0 tcpdump
$

-Add bpf.c which stores all the code for retrieving and parsing bpf
related statistics.
-Modify main.c to add support for the -B option and hook it into the
program logic.
-Add bpf.c to the build.
-Document this new functionality in the man page and bump the revision
date.
-Add prototype for bpf_stats function.


# 149413 24-Aug-2005 yar

List -W as one of the meaningful options to the -i (interfaces)
display of netstat(1).

MFC after: 3 days


# 149254 18-Aug-2005 glebius

Add a new switch -h for interface stats mode, which prints all interface
statistics in human readable form.

In collaboration with: vsevolod
Reviewed by: cperciva


# 129906 31-May-2004 bmilekic

Bring in mbuma to replace mballoc.

mbuma is an Mbuf & Cluster allocator built on top of a number of
extensions to the UMA framework, all included herein.

Extensions to UMA worth noting:
- Better layering between slab <-> zone caches; introduce
Keg structure which splits off slab cache away from the
zone structure and allows multiple zones to be stacked
on top of a single Keg (single type of slab cache);
perhaps we should look into defining a subset API on
top of the Keg for special use by malloc(9),
for example.
- UMA_ZONE_REFCNT zones can now be added, and reference
counters automagically allocated for them within the end
of the associated slab structures. uma_find_refcnt()
does a kextract to fetch the slab struct reference from
the underlying page, and lookup the corresponding refcnt.

mbuma things worth noting:
- integrates mbuf & cluster allocations with extended UMA
and provides caches for commonly-allocated items; defines
several zones (two primary, one secondary) and two kegs.
- change up certain code paths that always used to do:
m_get() + m_clget() to instead just use m_getcl() and
try to take advantage of the newly defined secondary
Packet zone.
- netstat(1) and systat(1) quickly hacked up to do basic
stat reporting but additional stats work needs to be
done once some other details within UMA have been taken
care of and it becomes clearer to how stats will work
within the modified framework.

From the user perspective, one implication is that the
NMBCLUSTERS compile-time option is no longer used. The
maximum number of clusters is still capped off according
to maxusers, but it can be made unlimited by setting
the kern.ipc.nmbclusters boot-time tunable to zero.
Work should be done to write an appropriate sysctl
handler allowing dynamic tuning of kern.ipc.nmbclusters
at runtime.

Additional things worth noting/known issues (READ):
- One report of 'ips' (ServeRAID) driver acting really
slow in conjunction with mbuma. Need more data.
Latest report is that ips is equally sucking with
and without mbuma.
- Giant leak in NFS code sometimes occurs, can't
reproduce but currently analyzing; brueffer is
able to reproduce but THIS IS NOT an mbuma-specific
problem and currently occurs even WITHOUT mbuma.
- Issues in network locking: there is at least one
code path in the rip code where one or more locks
are acquired and we end up in m_prepend() with
M_WAITOK, which causes WITNESS to whine from within
UMA. Current temporary solution: force all UMA
allocations to be M_NOWAIT from within UMA for now
to avoid deadlocks unless WITNESS is defined and we
can determine with certainty that we're not holding
any locks when we're M_WAITOK.
- I've seen at least one weird socketbuffer empty-but-
mbuf-still-attached panic. I don't believe this
to be related to mbuma but please keep your eyes
open, turn on debugging, and capture crash dumps.

This change removes more code than it adds.

A paper is available detailing the change and considering
various performance issues, it was presented at BSDCan2004:
http://www.unixdaemons.com/~bmilekic/netbuf_bmilekic.pdf
Please read the paper for Future Work and implementation
details, as well as credits.

Testing and Debugging:
rwatson,
brueffer,
Ketrien I. Saihr-Kesenchedra,
...
Reviewed by: Lots of people (for different parts)


# 129432 19-May-2004 ru

Bumped document date.
Fixed the grammar nit.


# 127399 25-Mar-2004 bms

Sort SRCS in Makefile and document -g option additions.

Nudged by: ru


# 123764 23-Dec-2003 alfred

Restore old netstat -m output.
A new flag '-c' can be used to ask for the cache stats.


# 123030 28-Nov-2003 bms

Fix some minor nits in netstat whereby large interface names would be
truncated. In environments where many tunnel or vlan interfaces are created,
interface names have high numbers which overflow the field width.

PRs: bin/52349, bin/35838
Submitted by: Mike Tancsa, Scot W. Hetzel
Approved by: re (rwatson)


# 118627 07-Aug-2003 hsu

1. Add support for printing PIM-related statistics with
netstat -s -p pim

2. Print information about the bandwidth meters installed in the kernel with
netstat -g

Submitted by: Pavlin Radoslavov <pavlin@icir.org>


# 115216 21-May-2003 ru

Revert last delta.

The -l option is deprecated (hence undocumented in usage() and
SYNOPSIS), as was threatened in the commitlog accompanying rev.
1.10 of main.c.

Approved by: re (blanket)


# 112658 26-Mar-2003 keramida

Document the undcumnt -l option (that's a lowercase `el').

PR: 48466
Submitted by: Peter Philipp <dot.bomb@freenet.de>


# 85375 23-Oct-2001 murray

Fix typo.

PR: docs/31388
Submitted by: Yoshihiko Sarumaru <mistral@imasy.or.jp>


# 83349 11-Sep-2001 ru

Implement the ``-f address_family'' filter for -i.

Prodded by: Igor Podlesny <poige@morning.ru>


# 83207 07-Sep-2001 ru

Yay!
Make this manpage readable and match the reality.


# 82463 28-Aug-2001 dd

-a is not an options (sic).


# 82462 28-Aug-2001 dd

Mention what an asterisk means in the -i display.

PR: 30069
Submitted by: andrew@ugh.net.au


# 79755 15-Jul-2001 dd

Remove whitespace at EOL.


# 79366 06-Jul-2001 ru

mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).


# 78667 23-Jun-2001 ru

Add netstat(1) knob to reset net.inet.{ip|icmp|tcp|udp|igmp}.stats.
For example, ``netstat -s -p ip -z'' will show and reset IP stats.

PR: bin/17338


# 78659 23-Jun-2001 ru

Honor -s -s (don't show zero stats) with -r, untangle SYNOPSIS further.
(usage() still is not synchronized with SYNOPSIS, intentionally.)


# 78284 15-Jun-2001 ru

First round of netstat(1) cleanup.

Removed the ambiguity in -s, -f, -p and -i flags handling.
Basically, there are four displays (except others):

1. 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:

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

This is a work in progress. Manpage has been fixed slightly,
but is still incomplete.


# 78238 14-Jun-2001 assar

add the option -S for printing port numbers symbolically but addresses
numerically. clean up the CFLAGS in Makefile.


# 78219 14-Jun-2001 ru

Restore -M -N support for -m.

PR: 20808


# 78216 14-Jun-2001 ru

Removed -h option.


# 78079 11-Jun-2001 ume

Mention about -rl behavior change. Now, MTU is printed.


# 76328 07-May-2001 ru

Restore printing of routes cloned from a RTF_CLONING parent
(e.g., ARP table entries) with the default routing display.

PR: bin/26970
Reviewed by: wollman
MFC after: 3 days


# 74416 18-Mar-2001 ru

s/protocol-cloned/cloned/ I have missed in 1.24 -> 1.25.


# 74311 15-Mar-2001 des

Add a -W flag that tells netstat not to truncate addresses even if they are
too long for the column they're printed in.

Move variable definitions out of netstat.h and into main.c.

Clean up some warnings.


# 74299 15-Mar-2001 ru

net/route.c:

A route generated from an RTF_CLONING route had the RTF_WASCLONED flag
set but did not have a reference to the parent route, as documented in
the rtentry(9) manpage. This prevented such routes from being deleted
when their parent route is deleted.

Now, for example, if you delete an IP address from a network interface,
all ARP entries that were cloned from this interface route are flushed.

This also has an impact on netstat(1) output. Previously, dynamically
created ARP cache entries (RTF_STATIC flag is unset) were displayed as
part of the routing table display (-r). Now, they are only printed if
the -a option is given.

netinet/in.c, netinet/in_rmx.c:

When address is removed from an interface, also delete all routes that
point to this interface and address. Previously, for example, if you
changed the address on an interface, outgoing IP datagrams might still
use the old address. The only solution was to delete and re-add some
routes. (The problem is easily observed with the route(8) command.)

Note, that if the socket was already bound to the local address before
this address is removed, new datagrams generated from this socket will
still be sent from the old address.

PR: kern/20785, kern/21914
Reviewed by: wollman (the idea)


# 71895 01-Feb-2001 ru

mdoc(7) police: split punctuation characters + misc fixes.


# 68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


# 57909 11-Mar-2000 shin

Add "-l" option description.

Noticed the necessity by Ben Smithurst <ben@scientia.demon.co.uk> message
on freebsd-current.


# 57670 01-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


# 54574 13-Dec-1999 guido

Add new option, -L that will listen the various listen queue lengths.

Reviewed by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>,
Clive Lin <clive@GnatS.CirX.ORG>


# 54263 07-Dec-1999 shin

udp IPv6 support, IPv6/IPv4 tunneling support in kernel,
packet divert at kernel for IPv6/IPv4 translater daemon

This includes queue related patch submitted by jburkhol@home.com.

Submitted by: queue related patch from jburkhol@home.com
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project


# 52666 30-Oct-1999 phantom

uncomment FILES section (it look reasonable here)
mdoc(7)'fy


# 52419 21-Oct-1999 julian

Whistle's Netgraph link-layer (sometimes more) networking infrastructure.
Been in production for 3 years now. Gives Instant Frame relay to if_sr
and if_ar drivers, and PPPOE support soon. See:
ftp://ftp.whistle.com/pub/archie/netgraph/index.html
for on-line manual pages.

Reviewed by: Doug Rabson (dfr@freebsd.org)
Obtained from: Whistle CVS tree


# 51015 06-Sep-1999 sheldonh

Add xrefs to the {f,net,sock}stat.1 manpages. While I'm in there, fix
the sockstat.1 document title, which still remembers when sockstat was
called lsock.

Reviewed by: mpp


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 49642 11-Aug-1999 nik

Document the use of the -a flag in conjunction with the -r flag.

PR: docs/13037
Submitted by: Christopher Masto <chris@netmonger.net>


# 48792 12-Jul-1999 nik

Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

.\" $Id$
.\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by: bde


# 46097 26-Apr-1999 luigi

Add support for printing bridging statistics with ``-p bdg '' .
If someone has a better flag to use I'll be glad to change it.


# 35651 03-May-1998 steve

Remove (now) invalid .Xr trsp 8

PR: 6494
Submitted by: Don Morrison <dmorrisn@u.washington.edu>


# 30758 27-Oct-1997 steve

Typo fix.

PR: docs/4579
Submitted by: Stephen J. Roznowski <sjr@home.net>


# 16392 15-Jun-1996 peter

make netstat distinguish broadcast and blackhole routes where they appear.

(RTF_BLACKHOLE was already documented as being shown, but the code ignored
it)

Sumbitted by: Greg Lehey <grog@lemis.de>


# 16180 07-Jun-1996 julian

I guess the docs should mention the new protocol at least once.


# 15258 13-Apr-1996 jhay

Document that ipx is a valid protocol for the -f option.
Comment out ns and iso. They are not supported anymore.


# 14301 29-Feb-1996 dg

Make the -w option actually useful to people. Instead of it creating a
messy 130 column collage, output the system totals -or- info for a
specific interface if -I is given. Also wait for <interval> before
outputting the first sample so that it represents meaningful data (as
opposed to the total since the system was booted - most busy systems
wrap around many times during their operation, so these numbers are
only misleading).


# 13511 20-Jan-1996 mpp

Fix a variety of minor typos and cross references in a bunch of
man pages.

Masanobu Saitoh <msaitoh@spa.is.uec.ac.jp>
Giles Lean <giles@nemeton.com.au>
<soda@sra.co.jp>


# 5108 14-Dec-1994 wollman

Document new route flags.


# 3534 12-Oct-1994 dg

Added '-b' option to display the number of in and out bytes on a given
interface (used with -i and -I flag).


# 1856 05-Aug-1994 dg

Converted 'vmunix' to 'kernel'.


# 1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources