From owner-freebsd-net@FreeBSD.ORG Sun Oct 15 05:22:15 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F9DA16A407 for ; Sun, 15 Oct 2006 05:22:15 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D40743D53 for ; Sun, 15 Oct 2006 05:22:14 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.176.222] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis), id 0ML21M-1GYyRv14eU-0002jX; Sun, 15 Oct 2006 07:22:11 +0200 From: Max Laier Organization: FreeBSD To: freebsd-net@freebsd.org Date: Sun, 15 Oct 2006 07:22:03 +0200 User-Agent: KMail/1.9.4 References: <20061014071416.64065.qmail@web56508.mail.re3.yahoo.com> In-Reply-To: <20061014071416.64065.qmail@web56508.mail.re3.yahoo.com> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3769149.ZUTpy8zbdG"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200610150722.09919.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Dan b Subject: Re: reset netstat statistics X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Oct 2006 05:22:15 -0000 --nextPart3769149.ZUTpy8zbdG Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 14 October 2006 09:14, Dan b wrote: > I searched the archives for this and was unable to > find anything relevant. I have a machine that is > being used as a NAT Router with IPFW and IPNAT running > 5.3-RELEASE. I'm only using IPFW to keep track of > traffic, no actual packet filtering is going on. I recommend that you use pf for that. A simple pfctl -e with no ruleset=20 will get you 64bit packet and byte counters for all interfaces using=20 pfctl -vvsI or for a specific interface with: > 7:14 [~]amd64# pfctl -vvsI -i fxp0 > fxp0 (instance, attached) > Cleared: Fri Sep 29 23:24:37 2006 > References: [ States: 0 Rules: 15 ] > In4/Pass: [ Packets: 46986037 Bytes: 28315507365 ] > In4/Block: [ Packets: 0 Bytes: 0 ] > Out4/Pass: [ Packets: 43460700 Bytes: 40071770000 ] > Out4/Block: [ Packets: 0 Bytes: 0 ] > In6/Pass: [ Packets: 9982 Bytes: 3320321 ] > In6/Block: [ Packets: 0 Bytes: 0 ] > Out6/Pass: [ Packets: 5259 Bytes: 418780 ] > Out6/Block: [ Packets: 3 Bytes: 192 ] > The problem is that the statistics reported by netstat > seem to reset themselves intermittently. Last night I > ran netstat -ib and got an Ibytes stat of around 2.1GB > on my sis0 adapter. Today I ran netstat -ib and got > an Ibytes stat of around 600MB on my sis0 adapter. > The system has around 29 days of uptime, and I have > run ipfw zero a few times, but have not run netstat -z > at all. Let me know if you have any ideas about this. This is because the numbers reported by netstat are based on (signed)=20 32bit counters. Either you sample these numbers at a high enough rate or=20 you use other 64bit counters (see above). =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart3769149.ZUTpy8zbdG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFMcWBXyyEoT62BG0RAtfnAJ9PSgQq+d/NCd2heAAy9VsktCbwygCePoxU jTNU8z3EXFZvtB8NxmHs7Ak= =6NHp -----END PGP SIGNATURE----- --nextPart3769149.ZUTpy8zbdG--