From owner-freebsd-net@FreeBSD.ORG Mon Jun 24 04:05:55 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 33B433B2 for ; Mon, 24 Jun 2013 04:05:55 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id E621C1C24 for ; Mon, 24 Jun 2013 04:05:54 +0000 (UTC) Received: from jre-mbp.elischer.org (ppp121-45-226-51.lns20.per1.internode.on.net [121.45.226.51]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id r5O45f9A042740 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 23 Jun 2013 21:05:44 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <51C7C590.1070308@freebsd.org> Date: Mon, 24 Jun 2013 12:05:36 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Olivier_Cochard-Labb=E9?= Subject: Re: netstat -i not accurate on -stable ? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jun 2013 04:05:55 -0000 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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >