Re: wlan0/iwn: no upload statistics

From: Marcus Reid <marcus_at_blazingdot.com>
Date: Thu, 12 Jun 2014 01:47:06 -0400
On Wed, Jun 11, 2014 at 09:06:45PM +0800, bycn82 wrote:
> Just tell "the command is not working" cannot help in resolving the
> problem. Could you please provide more detail? for example.

I already gave the info that I have.  In this case the data provided by
the sysctl that gets interface statistics is incomplete.

systat -ifstat shows:

     wlan0  in      0.000 KB/s          0.000 KB/s           82.933 MB
            out     0.000 KB/s          0.000 KB/s            0.000 KB

In the systat case, it appears to poll each interface with a:

  20966 systat   SCTL  "net.link.generic.ifdata.3.1"

netstat -I wlan0 -i 1 shows:

            input          wlan0           output
   packets  errs idrops      bytes    packets  errs      bytes colls
         7     0     0       5010          7     0          0     0
        15     0     0      10378         15     0          0     0
        22     0     0      14164         18     0          0     0
        21     0     0      13058         19     0          0     0
   ...

Note that there are output packets, but not output bytes listed.
netstat appears to use netgraph for its data, so both the sysctl and
netgraph methods of getting the data is affected similarly.

This is where the trail went cold for me.  I tried looking at the iwn
driver sources but did not find the place where any counters in the
kernel are updated.  Maybe someone more familiar with the way network
drivers are written would have better luck.

I had written it off as a hardware quirk when I looked into it, but it
looks like more than just my wireless card is affected.

Marcus


> 1. Firewall can tell you the total in/out traffic
> 2. The systat -ifstat result.
> 3. Netstat information
> 
> In previous email, the guy provided the below information.
> 
> > > systat -ifstat output:
> > > Interface           Traffic               Peak                Total
> > >      wlan0  in      1.066 KB/s         16.155 KB/s          377.757 MB
> > >             out     0.000 KB/s          0.000 KB/s            0.000 KB
> 
> Can you please confirm whether the "377.757 MB" is `in` or `out` traffic?
> 
> 
> > -----Original Message-----
> > From: owner-freebsd-current_at_freebsd.org [mailto:owner-freebsd-
> > current_at_freebsd.org] On Behalf Of Marcus Reid
> > Sent: 11 June, 2014 18:05
> > To: Stefan Ehmann
> > Cc: freebsd-current_at_freebsd.org
> > Subject: Re: wlan0/iwn: no upload statistics
> > 
> > On Sat, Jun 07, 2014 at 11:26:39AM +0200, Stefan Ehmann wrote:
> > > Network monitoring tools show download traffic, but no upload data.
> > 
> > I have an iwn0: <Intel WiFi Link 5100> and have the same problem.  I was
> > able to track it down to being some missing ifmib(4) data, secifically
> > ifi_obytes from the if_data structure (see ifnet(9)).
> > 
> > This was a little while back, and I seem to remember someone else with
> > using iwn that didn't have the problem.  Another thing is that if you do
> > a 'netstat -I wlan0 -i 1', output bytes are missing, but if you look at
> > iwn0 instead all you see is the output bytes and nothing else (except
> > sometimes you get some numbers in the output packets column seemingly at
> > random).
> > 
> > Marcus
> > 
> > >
> > > systat -ifstat output:
> > > Interface           Traffic               Peak                Total
> > >      wlan0  in      1.066 KB/s         16.155 KB/s          377.757 MB
> > >             out     0.000 KB/s          0.000 KB/s            0.000 KB
> > >
> > >
> > > Tested on amd64 CURRENT from few days ago.
> > >
> > > netword Card is:
> > > iwn0: <Intel Centrino Ultimate-N 6300> mem 0xf2000000-0xf2001fff irq
> > > 17 at device 0.0 on pci3
> > _______________________________________________
> > freebsd-current_at_freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "freebsd-current-
> > unsubscribe_at_freebsd.org"
> 
Received on Thu Jun 12 2014 - 03:47:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:50 UTC