netstat -i not accurate on -stable ?
Julian Elischer
julian at freebsd.org
Mon Jun 24 04:05:55 UTC 2013
On 6/22/13 4:28 PM, Olivier Cochard-Labbé wrote:
> Hi all,
>
> I was testing my pthread-netblbast (PR bin/179085) when I found a
> problem with netstat counters (tested on 9-stable r252056).
>
> netreceive (src/toots/tools/netrate) display this output:
> 542025 pps 43.362 Mbps - 271554 pkts in 0.500998393 ns
> 541562 pps 43.325 Mbps - 271323 pkts in 0.501000754 ns
> 541517 pps 43.321 Mbps - 271300 pkts in 0.500999700 ns
> 540487 pps 43.239 Mbps - 270784 pkts in 0.500999904 ns
> 541541 pps 43.323 Mbps - 271312 pkts in 0.500999621 ns
> 540624 pps 43.250 Mbps - 270853 pkts in 0.501000361 ns
> 541403 pps 43.312 Mbps - 271243 pkts in 0.500999669 ns
> 541079 pps 43.286 Mbps - 271081 pkts in 0.501000212 ns
> 540887 pps 43.271 Mbps - 270985 pkts in 0.501000258 ns
> 541796 pps 43.344 Mbps - 271440 pkts in 0.500999971 ns
> 541056 pps 43.284 Mbps - 271069 pkts in 0.500999719 ns
> 541224 pps 43.298 Mbps - 271155 pkts in 0.501002856 ns
> 541120 pps 43.290 Mbps - 271100 pkts in 0.500997659 ns
>
> But in the same time a "netstat -ihw 1" display this output:
> input (Total) output
> packets errs idrops bytes packets errs bytes colls
> 521k 508k 0 30M 3 0 562 0
> 521k 511k 0 30M 3 0 514 0
> 521k 526k 0 30M 3 0 514 0
> 521k 538k 0 30M 4 0 616 0
> 521k 495k 0 30M 3 0 514 0
> 521k 502k 0 30M 3 0 514 0
> 521k 531k 0 30M 3 0 514 0
> 521k 502k 0 30M 3 0 514 0
> 521k 504k 0 30M 3 0 514 0
> 521k 495k 0 30M 3 0 514 0
> 521k 498k 0 30M 3 0 514 0
> 521k 516k 0 30M 3 0 514 0
>
> There are about 20Kpps difference between them.
check if you get 60 of each in a 1 minute period.
it's possible that due to overhead one of them is going to only get
55 iterations per second producing a difference...
>
> Regards,
>
> Olivier
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>
More information about the freebsd-net
mailing list