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] Traffic Counting / port analysis using Xen 3.0.2?

To: Xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Traffic Counting / port analysis using Xen 3.0.2?
From: "Robert Hulme" <rob@xxxxxxxxxxxx>
Date: Thu, 1 Jun 2006 14:24:49 +0100
Delivery-date: Thu, 01 Jun 2006 06:27:21 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=huB4ISlf4jD24iwm6rfhudpDv5LydITw7wziUm6+QFII7Ldr4ugLLw5Z7nOjWAd/lskxx4iXk+SqT4k8Jd+LXZWkcfyNTilZgwu1ETvD+lpjodKgmXodQmic7fLk/AVawwZzJ16MI2vvJubum9rj2F9qFzRIdYx9TkbBx3m8/0Y=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <36745.85.116.203.38.1148242446.squirrel@xxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <36745.85.116.203.38.1148242446.squirrel@xxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Can/must this be done in the Xen0-domain? Is there an more "elegant" way
(security wise) to fire up an own virtual machine handling this and acting
as a bridge itself?
I'm not sure I 100% understand what you're trying to do (you refer to
domains that you don't control?)...

I would suggest two possibilities:

1. Get raw bytes count from the interface from dom0
cat /sys/class/net/vif#{id}.0/statistics/tx_bytes
cat /sys/class/net/vif#{id}.0/statistics/rx_bytes

Where id is the id for the running domain from xm list.

2. Use iptables
You can do quite complex traffic monitoring using iptables. See:
http://www.netfilter.org/ ...

-Rob

--
------------------------------------------------------
"98.5% of DNA is considered to be junk DNA with no known purpose.
Maybe it's XML tags." -- Anon

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it." - Kernighan

http://www.robhulme.com/
http://robhu.livejournal.com/

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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-users] Traffic Counting / port analysis using Xen 3.0.2?, Robert Hulme <=