WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] can one do traffic accounting on bridged domU's?

Subject: Re: [Xen-users] can one do traffic accounting on bridged domU's?
From: Thomas Goirand <thomas@xxxxxxxxxx>
Date: Sat, 16 May 2009 16:25:08 +0800
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 16 May 2009 01:25:58 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=goirand.fr; h=message-id: date:from:mime-version:cc:subject:references:in-reply-to: content-type:content-transfer-encoding; q=dns/txt; s=postfix; bh= cEEBGI0QgtgBLh7Rng/Li/6cQnc=; b=ssOFlyH0e5THegOvum3Hv3pGM50zr5NY aR4FeNTBnXlvPt55tX9jWMsMWihxeABluuxK2WvJB5iI7E4NPoa0boqMbv3fLrEW BHUSdHMJEyMKk6Dh3IGAktKg5xUiEM4ZNaAH+fUodRne2dzyq41scOdRsAn/DNme 4EXUQ/JsLWM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=goirand.fr; h=message-id:date:from:mime-version:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=postfix; b= qgNF0PyGi2ccgaAdRDLh1vQM/ThnLVOozfo26+LmdLRPh2XxObblu1t+2O+ixUiq 3TW36ASUtBNxOOl5ltb64zS2U9iSKkpZZt15O3KkxlF8i/4sq9JbHJQledLY9FH/ du2qoEDuw48r17tISZ2bplBvbTBJ/bLTmNkfLYSuiM4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <a06240800c63417bc4272@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Openpgp: id=98EF9A49
Organization: GPLHost
References: <695200da0905151451g7f5ac147s4afb14a42fd929bc@xxxxxxxxxxxxxx> <a06240800c63417bc4272@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)
Simon Hobson wrote:
> Rudi Ahlers wrote:
> 
>> I'm just wondering, is it possible to setup the dom0 to perform
>> traffic account of domU's, which are setup using bridge mode networking?
> 
> Depends on what you want to do.
> 
> If logging traffic in/out of the real interfaces by IP address is
> enough, then that's reasonably easy to do - though it won't log traffic
> between Dom0 and DomU or between DomU's on the same box. Doing it
> strictly by virtual interface will be a bit more work as the list of
> interfaces will keep changing.

Well, that's not so hard to perform. Here's a quick example, taken from
our stable version of dtc-xen:

http://git.gplhost.com/gitweb/?p=dtc-xen.git;a=blob;f=panel/graph/xenupdate.py;h=c1eb90f49871a66817cc841155b43f69b993021b;hb=f78e9f8f48920b1ceb39d3ad4b68f3cb5f015633

This sends CPU, IO and Network usage to some RRDs. Here's the graphing
for the network part:

http://git.gplhost.com/gitweb/?p=dtc-xen.git;a=blob;f=panel/graph/xennetgraph.py;h=53a31be86956fd0f538ead6948988d633b53f00b;hb=f78e9f8f48920b1ceb39d3ad4b68f3cb5f015633

These 2 scripts are of course to set in a cron job. Note that on our
system, all domU are called xenXX, feel free to adapt to your needs.

On our next version of dtc-xen, it saves the values, that are fetched
using SOAP, and then stored on our management server. That's of course
harder to read / use right away.

Thomas

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users