From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 01:29:58 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C28061065676 for ; Tue, 23 Aug 2011 01:29:58 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from fallbackmx08.syd.optusnet.com.au (fallbackmx08.syd.optusnet.com.au [211.29.132.10]) by mx1.freebsd.org (Postfix) with ESMTP id 546038FC08 for ; Tue, 23 Aug 2011 01:29:57 +0000 (UTC) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p7MN7tH1027393 for ; Tue, 23 Aug 2011 09:07:55 +1000 Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail15.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p7MN7q4F016500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 23 Aug 2011 09:07:53 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id p7MN7ptQ029038 for ; Tue, 23 Aug 2011 09:07:51 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id p7MN7p3k029037 for freebsd-net@freebsd.org; Tue, 23 Aug 2011 09:07:51 +1000 (EST) (envelope-from peter) Date: Tue, 23 Aug 2011 09:07:51 +1000 From: Peter Jeremy To: freebsd-net@freebsd.org Message-ID: <20110822230751.GA28157@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Statistics collection broken in "new" dummynet 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: Tue, 23 Aug 2011 01:29:58 -0000 --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I have been using dummynet(4) to do traffic shaping for simulated WANs for over a decade now and it has been very effective - thanks Luigi. I am currently looking at migrating the network simulator from 7.1 to 8.2 and have noticed that the statistics reported are now meaningless. Instead of reporting cumulative statistics, it now appears to reset them regularly - apparently whenever the pipe is empty. Sample results from 7.1 (currently inactive): 00224: 2.000 Mbit/s 9 ms 64 KB 1 queues (1 buckets) droptail mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte= Drp 0 udp 192.168.224.183/0 192.168.216.179/0 5404902 598099622 0 = 0 0 Sample results from 8.2 (currently active simulator): 00224: 2.000 Mbit/s 18 ms burst 0=20 q131296 64 KB 0 flows (1 buckets) sched 65760 weight 0 lmax 0 pri 0 droptail sched 65760 type FIFO flags 0x0 0 buckets 1 active 0 ip 0.0.0.0/0 0.0.0.0/0 2 1785 0 0 = 0 (and most of the time, the last line doesn't appear). I have checked a recent 9.0-BETA1 and it is still broken. Looking at the dummynet.txt file, I cannot see this mentioned. I have looked through the source and it does appear that scheduler instances are marked inactive in serve_sched() once they have no packets queued and are then garbage-collected via drain_scheduler_cb(). Is this the intent? If so, how can statistics be collected? --=20 Peter Jeremy --5mCyUwZo2JvN/JJP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk5S4UcACgkQ/opHv/APuIeIpgCfSnxp/YdfNQgkFOwXjzZacWNo njcAmwSleEGLPokHCmRV+SOxcSjtP6oJ =TjH3 -----END PGP SIGNATURE----- --5mCyUwZo2JvN/JJP--