Re: wlan0/iwn: no upload statistics

2014-06-11 Thread Marcus Reid
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   PeakTotal
  wlan0  in  1.066 KB/s 16.155 KB/s  377.757 MB
 out 0.000 KB/s  0.000 KB/s0.000 KB
 
 
 Tested on amd64 CURRENT from few days ago.
 
 netword Card is:
 iwn0: Intel Centrino Ultimate-N 6300 mem 0xf200-0xf2001fff irq 17
 at device 0.0 on pci3
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


RE: wlan0/iwn: no upload statistics

2014-06-11 Thread bycn82
Just tell the command is not working cannot help in resolving the problem. 
Could you please provide more detail? for example.

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   PeakTotal
   wlan0  in  1.066 KB/s 16.155 KB/s  377.757 MB
  out 0.000 KB/s  0.000 KB/s0.000 KB

Can you please confirm whether the 377.757 MB is `in` or `out` traffic?


 -Original Message-
 From: owner-freebsd-curr...@freebsd.org [mailto:owner-freebsd-
 curr...@freebsd.org] On Behalf Of Marcus Reid
 Sent: 11 June, 2014 18:05
 To: Stefan Ehmann
 Cc: freebsd-current@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   PeakTotal
   wlan0  in  1.066 KB/s 16.155 KB/s  377.757 MB
  out 0.000 KB/s  0.000 KB/s0.000 KB
 
 
  Tested on amd64 CURRENT from few days ago.
 
  netword Card is:
  iwn0: Intel Centrino Ultimate-N 6300 mem 0xf200-0xf2001fff irq
  17 at device 0.0 on pci3
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-
 unsubscr...@freebsd.org

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: wlan0/iwn: no upload statistics

2014-06-11 Thread Marcus Reid
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/s0.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  bytespackets  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   PeakTotal
wlan0  in  1.066 KB/s 16.155 KB/s  377.757 MB
   out 0.000 KB/s  0.000 KB/s0.000 KB
 
 Can you please confirm whether the 377.757 MB is `in` or `out` traffic?
 
 
  -Original Message-
  From: owner-freebsd-curr...@freebsd.org [mailto:owner-freebsd-
  curr...@freebsd.org] On Behalf Of Marcus Reid
  Sent: 11 June, 2014 18:05
  To: Stefan Ehmann
  Cc: freebsd-current@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   PeakTotal
wlan0  in  1.066 KB/s 16.155 KB/s  377.757 MB
   out 0.000 KB/s  0.000 KB/s0.000 KB
  
  
   Tested on amd64 CURRENT from few days ago.
  
   netword Card is:
   iwn0: Intel Centrino Ultimate-N 6300 mem 0xf200-0xf2001fff irq
   17 at device 0.0 on pci3
  ___
  freebsd-current@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-current
  To unsubscribe, send any mail to freebsd-current-
  unsubscr...@freebsd.org
 
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: wlan0/iwn: no upload statistics

2014-06-11 Thread Marcus Reid
On Thu, Jun 12, 2014 at 01:47:06AM -0400, Marcus Reid wrote:
 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/s0.000 KB

This was sort of a bad paste, I did it when there was no current activity.  The
'in' side looks fine normally.  Here's another one with activity:

  wlan0  in 11.364 KB/s 71.956 KB/s   95.683 MB
 out 0.000 KB/s  0.000 KB/s0.000 KB

There's definitely output, just not accounted for on the 'wlan0' interface.
If you look at iwn0, there it is:

netstat -I iwn0 -i 1 shows:

input   iwn0   output
   packets  errs idrops  bytespackets  errs  bytes colls
 0 0 0  0 64 0   9456 0
 0 0 0  0 78 0  11354 0
 0 0 0  0 54 0   8160 0
 0 0 0  0 46 0   7656 0
 0 0 0  0 56 0   8158 0

Marcus

 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  bytespackets  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   PeakTotal
 wlan0  in  1.066 KB/s 16.155 KB/s  377.757 MB
out 0.000 KB/s  0.000 KB/s0.000 KB
  
  Can you please confirm whether the 377.757 MB is `in` or `out` traffic?
  
  
   -Original Message-
   From: owner-freebsd-curr...@freebsd.org [mailto:owner-freebsd-
   curr...@freebsd.org] On Behalf Of Marcus Reid
   Sent: 11 June, 2014 18:05
   To: Stefan Ehmann
   Cc: freebsd-current@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   PeakTotal
 wlan0  in  1.066 KB/s 16.155 KB/s  377.757 MB
out 0.000 KB/s  0.000 KB/s0.000 KB
   
   
Tested on amd64 CURRENT from few days ago.
   
netword Card is:
iwn0: Intel Centrino Ultimate-N 6300 mem 0xf200-0xf2001fff irq
17 at device 0.0 on pci3
   ___
   freebsd-current@freebsd.org mailing list
   http://lists.freebsd.org/mailman/listinfo/freebsd-current
   To unsubscribe, send any mail to freebsd-current-
   unsubscr...@freebsd.org
  
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe

Re: wlan0/iwn: no upload statistics

2014-06-08 Thread Kevin Oberman
On Sat, Jun 7, 2014 at 7:19 AM, bycn82 byc...@gmail.com wrote:

 Hi,

 1. I checked the source code of systat, it actually read from the mibdata,
 so the result should be the same as sysctl.

 2. According to David's email, seems the netstat can show the correct
 output octets.

 Sorry I don’t have wireless network interface on my testing environment,
 but I noticed that the mibdta structure was changed recently,


 Best Regards,
 bycn82




  -Original Message-
  From: Stefan Ehmann [mailto:shoes...@gmx.net]
  Sent: 07 June, 2014 21:33
  To: bycn82; freebsd-current@freebsd.org
  Subject: Re: wlan0/iwn: no upload statistics
 
  On 07.06.2014 14:39, bycn82 wrote:
   Hi,
 
  Seem it was not clear in my original post: Only the wireless interface
  is affected. lo0 shows upload stats.
 
   More information is required. Please provide the output of the two
   commands below
  
   1.   sysctl -a | grep octets
 
  iwn0/wlan0 don't appear here:
  dev.em.0.mac_stats.good_octets_recvd: 0
  dev.em.0.mac_stats.good_octets_txd: 0
 
 
   2.   uname -a
  FreeBSD tomorrow.pepperland 11.0-CURRENT FreeBSD 11.0-CURRENT #8
  r267126: Fri Jun  6 06:14:13 CEST 2014
  stefan@tomorrow.pepperland:/usr/obj/usr/src/sys/TOMORROW  amd64


FWIW, this is not a problem new to HEAD. I see the same on 10-STABLE with
my iwn. I see no stats at all in dev.iwn and there is no dev.wlan at all.

-- 
R. Kevin Oberman, Network Engineer, Retired
E-mail: rkober...@gmail.com
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

RE: wlan0/iwn: no upload statistics

2014-06-07 Thread bycn82
Hi,

More information is required. Please provide the output of the two commands 
below

1.   sysctl -a | grep octets
2.   uname -a


Best Regards,
bycn82



 -Original Message-
 From: owner-freebsd-curr...@freebsd.org [mailto:owner-freebsd-
 curr...@freebsd.org] On Behalf Of Stefan Ehmann
 Sent: 07 June, 2014 17:27
 To: freebsd-current@freebsd.org
 Subject: wlan0/iwn: no upload statistics
 
 Network monitoring tools show download traffic, but no upload data.
 
 systat -ifstat output:
 Interface   Traffic   PeakTotal
  wlan0  in  1.066 KB/s 16.155 KB/s  377.757 MB
 out 0.000 KB/s  0.000 KB/s0.000 KB
 
 
 Tested on amd64 CURRENT from few days ago.
 
 netword Card is:
 iwn0: Intel Centrino Ultimate-N 6300 mem 0xf200-0xf2001fff irq 17
 at device 0.0 on pci3 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-
 unsubscr...@freebsd.org

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


RE: wlan0/iwn: no upload statistics

2014-06-07 Thread bycn82
Hi,
As you can see, it is working on my testing machine,
  
/0   /1   /2   /3   /4   /5   /6   /7   /8   /9   /10
 Load Average   |

  Interface   Traffic   PeakTotal
em1  in  0.000 KB/s  0.000 KB/s0.270 KB
 out 0.000 KB/s  0.000 KB/s0.041 KB

em0  in  0.165 KB/s  0.165 KB/s   10.560 MB
 out 0.277 KB/s  0.343 KB/s   30.720 MB

root@FB10Head:~ # sysctl -a | grep octets
dev.em.0.mac_stats.good_octets_recvd: 11575027
dev.em.0.mac_stats.good_octets_txd: 32219968
dev.em.1.mac_stats.good_octets_recvd: 288
dev.em.1.mac_stats.good_octets_txd: 42

root@FB10Head:~ # uname -a
FreeBSD FB10Head 11.0-CURRENT FreeBSD 11.0-CURRENT #2 r266983: Sun Jun  1 
01:57:38 UTC 2014 root@FB10Head:/usr/obj/usr/src/sys/GENERIC  amd64


Regards,
bycn82

 -Original Message-
 From: bycn82 [mailto:byc...@gmail.com]
 Sent: 07 June, 2014 20:39
 To: 'Stefan Ehmann'; 'freebsd-current@freebsd.org'
 Subject: RE: wlan0/iwn: no upload statistics
 
 Hi,
 
 More information is required. Please provide the output of the two
 commands below
 
 1. sysctl -a | grep octets
 2. uname -a
 
 
 Best Regards,
 bycn82
 
 
 
  -Original Message-
  From: owner-freebsd-curr...@freebsd.org [mailto:owner-freebsd-
  curr...@freebsd.org] On Behalf Of Stefan Ehmann
  Sent: 07 June, 2014 17:27
  To: freebsd-current@freebsd.org
  Subject: wlan0/iwn: no upload statistics
 
  Network monitoring tools show download traffic, but no upload data.
 
  systat -ifstat output:
  Interface   Traffic   PeakTotal
   wlan0  in  1.066 KB/s 16.155 KB/s  377.757 MB
  out 0.000 KB/s  0.000 KB/s0.000 KB
 
 
  Tested on amd64 CURRENT from few days ago.
 
  netword Card is:
  iwn0: Intel Centrino Ultimate-N 6300 mem 0xf200-0xf2001fff irq
  17 at device 0.0 on pci3
  ___
  freebsd-current@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-current
  To unsubscribe, send any mail to freebsd-current-
  unsubscr...@freebsd.org

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: wlan0/iwn: no upload statistics

2014-06-07 Thread David Wolfskill
On Sat, Jun 07, 2014 at 08:39:10PM +0800, bycn82 wrote:
 Hi,
 
 More information is required. Please provide the output of the two commands 
 below
 
 1. sysctl -a | grep octets
 2. uname -a
 ...

I'm not the OP, but I do (sometimes) run head, and have an iwn(4) NIC on
my laptop, so I checked: I was able to reproduce the cited symptoms:


/0   /1   /2   /3   /4   /5   /6   /7   /8   /9   /10
 Load Average    

  Interface   Traffic   PeakTotal
  wlan0  in  0.400 KB/s 23.553 KB/s1.529 MB
 out 0.000 KB/s  0.000 KB/s0.000 KB


As a reality check:

g1-252(11.0-C)[4] date ; netstat -nibf inet ; sleep 10 ; date ; netstat -nibf 
inet
Sat Jun  7 05:47:02 PDT 2014
NameMtu Network   Address  Ipkts Ierrs Idrop Ibytes
Opkts Oerrs Obytes  Coll
lo0   - 127.0.0.0/8   127.0.0.10 - -  0 
   0 -  0 -
wlan0 - 172.17.0.0/16 172.17.1.252  7023 - -1438387 
4642 - 476288 -
Sat Jun  7 05:47:12 PDT 2014
NameMtu Network   Address  Ipkts Ierrs Idrop Ibytes
Opkts Oerrs Obytes  Coll
lo0   - 127.0.0.0/8   127.0.0.10 - -  0 
   0 -  0 -
wlan0 - 172.17.0.0/16 172.17.1.252  7039 - -1444099 
4658 - 477380 -
g1-252(11.0-C)[5] 

Finally, what you requested:

g1-252(11.0-C)[5] sysctl -a | grep octets
dev.em.0.mac_stats.good_octets_recvd: 0
dev.em.0.mac_stats.good_octets_txd: 0
g1-252(11.0-C)[6] uname -a
FreeBSD g1-252.catwhisker.org 11.0-CURRENT FreeBSD 11.0-CURRENT #1268  
r267149M/267149:1100022: Fri Jun  6 06:00:16 PDT 2014 
r...@g1-252.catwhisker.org:/common/S4/obj/usr/src/sys/CANARY  i386
g1-252(11.0-C)[7] 

(The machine is running head because it's in the middle of a
source-based update to r267211.)

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Taliban: Evil cowards with guns afraid of truth from a 14-year old girl.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


pgpOd81q_UxhS.pgp
Description: PGP signature


Re: wlan0/iwn: no upload statistics

2014-06-07 Thread Stefan Ehmann
On 07.06.2014 14:39, bycn82 wrote:
 Hi,

Seem it was not clear in my original post: Only the wireless interface
is affected. lo0 shows upload stats.

 More information is required. Please provide the output of the two commands 
 below
 
 1. sysctl -a | grep octets

iwn0/wlan0 don't appear here:
dev.em.0.mac_stats.good_octets_recvd: 0
dev.em.0.mac_stats.good_octets_txd: 0


 2. uname -a
FreeBSD tomorrow.pepperland 11.0-CURRENT FreeBSD 11.0-CURRENT #8
r267126: Fri Jun  6 06:14:13 CEST 2014
stefan@tomorrow.pepperland:/usr/obj/usr/src/sys/TOMORROW  amd64
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


RE: wlan0/iwn: no upload statistics

2014-06-07 Thread bycn82
Hi,

1. I checked the source code of systat, it actually read from the mibdata, so 
the result should be the same as sysctl. 

2. According to David's email, seems the netstat can show the correct output 
octets. 

Sorry I don’t have wireless network interface on my testing environment, but I 
noticed that the mibdta structure was changed recently,  


Best Regards,
bycn82




 -Original Message-
 From: Stefan Ehmann [mailto:shoes...@gmx.net]
 Sent: 07 June, 2014 21:33
 To: bycn82; freebsd-current@freebsd.org
 Subject: Re: wlan0/iwn: no upload statistics
 
 On 07.06.2014 14:39, bycn82 wrote:
  Hi,
 
 Seem it was not clear in my original post: Only the wireless interface
 is affected. lo0 shows upload stats.
 
  More information is required. Please provide the output of the two
  commands below
 
  1.   sysctl -a | grep octets
 
 iwn0/wlan0 don't appear here:
 dev.em.0.mac_stats.good_octets_recvd: 0
 dev.em.0.mac_stats.good_octets_txd: 0
 
 
  2.   uname -a
 FreeBSD tomorrow.pepperland 11.0-CURRENT FreeBSD 11.0-CURRENT #8
 r267126: Fri Jun  6 06:14:13 CEST 2014
 stefan@tomorrow.pepperland:/usr/obj/usr/src/sys/TOMORROW  amd64

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org