Hi David,

David Gwynne wrote on Mon, Sep 11, 2023 at 06:52:56AM +1000:
> On 7 Sep 2023, at 08:00, Steven Shockley wrote:

>> When running netstat -I [interface], what do the "fails" and "errs"
>> columns mean?  When my firewall is under network load, the output
>> interface fails and total errs increases.

> fails are the sum of qdrops and errs. qdrops are when the network
> stack drops packets getting packets on or off the driver, and errs
> are problems the driver has with packets. netstat -eI foo0 shows the
> errors on their own, netstat -dI foo0 shows the drops on their own.
> 
> if it's qdrops then it's a software performance/configuration
> problem. if it's errs then it's something in the driver reporting
> errors. if the driver provides kstats then you might be able to
> figure out if it's a dodgy cable or something like that.

Let's make sure this information does not get lost again.

David, are you OK with the following patch?

Rationale:
 * The "either" is just wrong.  The SYNOPSIS explicitly says that
   -I/-i and -w can be combined, and it works, too.
 * When documenting -I, saying "used with wait" is wrong, too,
   but in the opposite way.  Using -I without -w works quite well.

Yours,
  Ingo


Index: netstat.1
===================================================================
RCS file: /cvs/src/usr.bin/netstat/netstat.1,v
retrieving revision 1.98
diff -u -r1.98 netstat.1
--- netstat.1   4 Jan 2023 19:12:34 -0000       1.98
+++ netstat.1   12 Sep 2023 18:26:28 -0000
@@ -143,21 +143,27 @@
 .Fl w
 is specified as well.
 .It Fl d
-With either the interface display (options
+With the interface display (options
 .Fl I
 or
 .Fl i )
 or an interval (option
 .Fl w ) ,
-show only the number of dropped packets.
+show only the numbers of packets that were dropped by the network stack
+.Pq queue drops ,
+but do not show errors detected by the interface driver.
+Queue drops usually result from
+software performance or configuration problems.
 .It Fl e
-With either the interface display (options
+With the interface display (options
 .Fl I
 or
 .Fl i )
 or an interval (option
 .Fl w ) ,
-show only the number of errors on the interface.
+show only the numbers of errors detected by the interface driver,
+but do not show queue drops.
+Errors can for example result from hardware problems.
 .It Fl F
 When showing routes, only show routes whose gateway are in the
 same address family as the destination.
@@ -190,9 +196,14 @@
 .It Fl I Ar interface
 Show information about the specified
 .Ar interface ;
-used with a
-.Ar wait
-interval as described below.
+can optionally be combined with a
+.Fl w Ar wait
+interval.
+By default, the sums of all failures are shown, including both
+interface driver errors as reported by
+.Fl e
+and queue drops as reported by
+.Fl d .
 .It Fl i
 Show the state of interfaces which have been auto-configured
 (interfaces statically configured into a system but not

Reply via email to