From owner-freebsd-isp@FreeBSD.ORG Sun Jun 9 02:32:18 2013 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D82947FD for ; Sun, 9 Jun 2013 02:32:18 +0000 (UTC) (envelope-from kentas@hush.com) Received: from smtp1.hushmail.com (smtp1a.hushmail.com [65.39.178.236]) by mx1.freebsd.org (Postfix) with ESMTP id C0FF01790 for ; Sun, 9 Jun 2013 02:32:18 +0000 (UTC) Received: from smtp1.hushmail.com (smtp1a.hushmail.com [65.39.178.236]) by smtp1.hushmail.com (Postfix) with SMTP id F0D7A30B00 for ; Sun, 9 Jun 2013 02:32:11 +0000 (UTC) Received: from smtp.hushmail.com (w7.hushmail.com [65.39.178.32]) by smtp1.hushmail.com (Postfix) with ESMTP; Sun, 9 Jun 2013 02:32:11 +0000 (UTC) Received: by smtp.hushmail.com (Postfix, from userid 99) id D8E42200EA; Sun, 9 Jun 2013 02:32:11 +0000 (UTC) MIME-Version: 1.0 Date: Sat, 08 Jun 2013 22:32:11 -0400 To: freebsd-jail@freebsd.org Subject: Per-IP Bandwidth Monitoring From: "Kenta Suzumoto" In-Reply-To: <144D087B-9396-4FD5-90DD-2F7A29D9E55F@llaisdy.com> References: <20130607174701.9DAA0400EA@smtp.hushmail.com> <51B2228F.1000008@llaisdy.com> <20130607184536.4A4D7400EA@smtp.hushmail.com> <144D087B-9396-4FD5-90DD-2F7A29D9E55F@llaisdy.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="UTF-8" Message-Id: <20130609023211.D8E42200EA@smtp.hushmail.com> Cc: freebsd-isp@freebsd.org, freebsd-net@freebsd.org, freebsd-questions@freebsd.org X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2013 02:32:18 -0000 Hello. I'm running a FreeBSD machine with 5 IP addresses, each of them attached to a specific jail. I'm wondering if there is an easy way to monitor the bandwidth usage of each of them individually. Upon googling, I ran into a lot of suggestions like bandwidthd. I gave it a try and it seemed very broken and basically didn't work at all. I'm basically looking for a "vnstat that works per IP instead of per interface" kind of thing. jnettop wasn't what I was looking for. It doesn't have to make pretty graphs(but that's nice too), just human-readable text is fine. Anyone have a recommendation? Some links I came across that were unhelpful: http://freebsd.1045724.n5.nabble.com/how-to-measure-bandwidth-per-jail-td5797422.html http://forum.pfsense.org/index.php?&topic=32256.0 http://www.daemonforums.org/showthread.php?t=1199 Thanks From owner-freebsd-isp@FreeBSD.ORG Sun Jun 9 03:24:26 2013 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0B7134D8; Sun, 9 Jun 2013 03:24:26 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-qa0-x233.google.com (mail-qa0-x233.google.com [IPv6:2607:f8b0:400d:c00::233]) by mx1.freebsd.org (Postfix) with ESMTP id 93D9E1B6A; Sun, 9 Jun 2013 03:24:25 +0000 (UTC) Received: by mail-qa0-f51.google.com with SMTP id f11so1747268qae.3 for ; Sat, 08 Jun 2013 20:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1gmJNU02JMPse5uEd7m9BpZTBB8otKCck8h+btZqlhw=; b=u72FoX6sIj6F1FpHHIsFxfPzhm3qaeB7lrgOejJd1mg63sdTT41jvYpEpqZ9Kofh9F eCaLQ+3wl/kYW1lIxXt574vk4L//IZ+rR8R8478VLfQX5lOZJyo3M3RcPQRir6YK8ru0 41O+BRk6WDfhU7tm5zPa0wOHv79Ux1nWycplnxPE7AdHnq8xvXdXFjljKi/KMNKo/fox Onml0dZalGKeLibmpCcWBatwuAGersDIS5TqAgH5GF6n8DCHryF4gs2ZyCgBMXbz8PCZ AVDhkETwou+GEEFEn3MrVUIAA8MlTaTHFActTIZngsCFWu4uwb8AbW9ShLnaobYRcbXq JCmQ== MIME-Version: 1.0 X-Received: by 10.49.11.168 with SMTP id r8mr5160488qeb.34.1370748265089; Sat, 08 Jun 2013 20:24:25 -0700 (PDT) Received: by 10.49.42.73 with HTTP; Sat, 8 Jun 2013 20:24:25 -0700 (PDT) In-Reply-To: <20130609023211.D8E42200EA@smtp.hushmail.com> References: <20130607174701.9DAA0400EA@smtp.hushmail.com> <51B2228F.1000008@llaisdy.com> <20130607184536.4A4D7400EA@smtp.hushmail.com> <144D087B-9396-4FD5-90DD-2F7A29D9E55F@llaisdy.com> <20130609023211.D8E42200EA@smtp.hushmail.com> Date: Sat, 8 Jun 2013 20:24:25 -0700 Message-ID: Subject: Re: Per-IP Bandwidth Monitoring From: Xin LI To: Kenta Suzumoto Content-Type: text/plain; charset=UTF-8 Cc: freebsd-isp@freebsd.org, freebsd-net@freebsd.org, freebsd-jail@freebsd.org, freebsd-questions@freebsd.org X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2013 03:24:26 -0000 Try this patch: https://cgit.delphij.net/freebsd/patch/?id=39c6ec81eb015ed6788c203a1aea6148f813d063 We haven't merged it to -HEAD only because it's not clear how much overhead this would incur. Cheers, From owner-freebsd-isp@FreeBSD.ORG Sun Jun 9 08:28:44 2013 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B0E43121; Sun, 9 Jun 2013 08:28:44 +0000 (UTC) (envelope-from bah@bananmonarki.se) Received: from feeder.usenet4all.se (1-1-1-38a.far.sth.bostream.se [82.182.32.53]) by mx1.freebsd.org (Postfix) with ESMTP id 373EC1D1D; Sun, 9 Jun 2013 08:28:43 +0000 (UTC) Received: from kw.news4all.se (localhost [127.0.0.1]) by feeder.usenet4all.se (8.13.1/8.13.1) with ESMTP id r598SQ2k072688; Sun, 9 Jun 2013 10:28:30 +0200 (CEST) (envelope-from bah@bananmonarki.se) Message-ID: <51B43C9F.70802@bananmonarki.se> Date: Sun, 09 Jun 2013 10:28:15 +0200 From: Bernt Hansson User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130419 Thunderbird/17.0.5 MIME-Version: 1.0 To: Kenta Suzumoto Subject: Re: Per-IP Bandwidth Monitoring References: <20130607174701.9DAA0400EA@smtp.hushmail.com> <51B2228F.1000008@llaisdy.com> <20130607184536.4A4D7400EA@smtp.hushmail.com> <144D087B-9396-4FD5-90DD-2F7A29D9E55F@llaisdy.com> <20130609023211.D8E42200EA@smtp.hushmail.com> In-Reply-To: <20130609023211.D8E42200EA@smtp.hushmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-isp@freebsd.org, freebsd-net@freebsd.org, freebsd-jail@freebsd.org, freebsd-questions@freebsd.org X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2013 08:28:44 -0000 On 2013-06-09 04:32, Kenta Suzumoto wrote: > Hello. I'm running a FreeBSD machine with 5 IP addresses, each of them attached to a specific jail. I'm wondering if there is an easy way to monitor the bandwidth usage of each of them individually. Upon googling, I ran into a lot of suggestions like bandwidthd. I gave it a try and it seemed very broken and basically didn't work at all. I'm basically looking for a "vnstat that works per IP instead of per interface" kind of thing. jnettop wasn't what I was looking for. It doesn't have to make pretty graphs(but that's nice too), just human-readable text is fine. Anyone have a recommendation? > > Some links I came across that were unhelpful: > http://freebsd.1045724.n5.nabble.com/how-to-measure-bandwidth-per-jail-td5797422.html > > http://forum.pfsense.org/index.php?&topic=32256.0 > > http://www.daemonforums.org/showthread.php?t=1199 > > Thanks IPFW with pipes. No graphs. man ipfw TRAFFIC SHAPER CONFIGURATION The ipfw pipe, queue and sched commands are used to configure the traffic shaper and packet scheduler. See the TRAFFIC SHAPER (DUMMYNET) CONFIGURATION Section below for details. If the world and the kernel get out of sync the ipfw ABI may break, pre- venting you from being able to add any rules. This can adversely effect the booting process. You can use ipfw disable firewall to temporarily disable the firewall to regain access to the network, allowing you to fix the problem. From owner-freebsd-isp@FreeBSD.ORG Sun Jun 9 12:55:23 2013 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3B1CE209; Sun, 9 Jun 2013 12:55:23 +0000 (UTC) (envelope-from pjlists@netzkommune.de) Received: from mx1.dui.nkhosting.net (mx1.dui.nkhosting.net [213.9.94.26]) by mx1.freebsd.org (Postfix) with ESMTP id F0EA5185E; Sun, 9 Jun 2013 12:55:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mx1.dui.nkhosting.net (Postfix) with ESMTP id E87D3211C54AE; Sun, 9 Jun 2013 12:48:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mx1.dui.nkhosting.net Received: from mx1.dui.nkhosting.net ([127.0.0.1]) by localhost (mx1.dui.nkhosting.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xf3ojEhyin0E; Sun, 9 Jun 2013 12:48:02 +0200 (CEST) Received: from air13.home (AMontsouris-552-1-72-100.w92-140.abo.wanadoo.fr [92.140.39.100]) (Authenticated sender: pjlists@netzkommune.de) by mx1.dui.nkhosting.net (Postfix) with ESMTP id 598B4211C651D; Sun, 9 Jun 2013 12:48:02 +0200 (CEST) Subject: Re: Per-IP Bandwidth Monitoring Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset=us-ascii From: Philip Jocks In-Reply-To: <20130609023211.D8E42200EA@smtp.hushmail.com> Date: Sun, 9 Jun 2013 12:47:59 +0200 Jabber-Id: pj@netzkommune.de Content-Transfer-Encoding: quoted-printable Message-Id: <89E98E53-6B11-468D-B160-2188FE189983@netzkommune.de> References: <20130607174701.9DAA0400EA@smtp.hushmail.com> <51B2228F.1000008@llaisdy.com> <20130607184536.4A4D7400EA@smtp.hushmail.com> <144D087B-9396-4FD5-90DD-2F7A29D9E55F@llaisdy.com> <20130609023211.D8E42200EA@smtp.hushmail.com> To: Kenta Suzumoto X-Mailer: Apple Mail (2.1503) Cc: freebsd-isp@freebsd.org, freebsd-net@freebsd.org, freebsd-jail@freebsd.org, freebsd-questions@freebsd.org X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2013 12:55:23 -0000 Am 09.06.2013 um 04:32 schrieb Kenta Suzumoto : > Hello. I'm running a FreeBSD machine with 5 IP addresses, each of them = attached to a specific jail. I'm wondering if there is an easy way to = monitor the bandwidth usage of each of them individually. Upon googling, = I ran into a lot of suggestions like bandwidthd. I gave it a try and it = seemed very broken and basically didn't work at all. I'm basically = looking for a "vnstat that works per IP instead of per interface" kind = of thing. jnettop wasn't what I was looking for. It doesn't have to make = pretty graphs(but that's nice too), just human-readable text is fine. = Anyone have a recommendation? >=20 > Some links I came across that were unhelpful:=20 > = http://freebsd.1045724.n5.nabble.com/how-to-measure-bandwidth-per-jail-td5= 797422.html >=20 > http://forum.pfsense.org/index.php?&topic=3D32256.0 >=20 > http://www.daemonforums.org/showthread.php?t=3D1199 I was using sysutils/ipa for this. It works with IPFW and also with PF, = I think, I have just used it with ipfw, worked pretty fine. It also = supports all sorts of reporting. Cheers, Philip