From owner-freebsd-net@FreeBSD.ORG Sat Jun 22 08:28:38 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 A0547605 for ; Sat, 22 Jun 2013 08:28:38 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-ve0-x236.google.com (mail-ve0-x236.google.com [IPv6:2607:f8b0:400c:c01::236]) by mx1.freebsd.org (Postfix) with ESMTP id 6859411C2 for ; Sat, 22 Jun 2013 08:28:38 +0000 (UTC) Received: by mail-ve0-f182.google.com with SMTP id ox1so7114061veb.41 for ; Sat, 22 Jun 2013 01:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=6ni1zeTOSPepJAPQCpSgyysUr2G8b7R5iQnorORpNCY=; b=Mkb2l6jg1SRgoIiZTpX7kFmxyPcWim4xxxhGEtTP8TdrUnDuLiD+2nEKDoneHvyDvv Cg+i+pNuODQXZzf9YPKaQ7PaoRLsOXQnvZ+oiq4reKGONS3euUX0cgDGH2WXI8XU8sne QFac3UeNZf4CGvCfNuk5STmYwt+u7gUCvga6Bt3pUwZ1FKk32d6aOkm0Q3Z7U0fWTd4D twDHx0Jdxjy1Z0mB2dz3KGZBzGfvpDnZVQZEXtmedasLV6XFNYRx826/ZjkcZwiHfOL3 D7Ca0ESiGMWfQxdAOk47FMI8GOKjonyGnWledBrrZnowa2RfJOexg36Ci4PyHplyrAXl ZwjA== X-Received: by 10.52.74.67 with SMTP id r3mr6243001vdv.112.1371889717944; Sat, 22 Jun 2013 01:28:37 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.58.189.132 with HTTP; Sat, 22 Jun 2013 01:28:17 -0700 (PDT) From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Sat, 22 Jun 2013 10:28:17 +0200 X-Google-Sender-Auth: sJuvtuPkooA-XH4H8M1Ye6VwGh0 Message-ID: Subject: netstat -i not accurate on -stable ? To: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 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: Sat, 22 Jun 2013 08:28:38 -0000 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. Regards, Olivier