[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • 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=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Openpgp: id=98EF9A49

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.