|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Traffic accounting in xen.
On Sun, Aug 20, 2006 at 06:13:40AM +0000, Paul M. wrote:
> If dom0 is Linux based then IPTables can be used. You can create a
> rule that matches the incoming or outgoing interface to that of one of
> the domUs. The rule doesn't need an action. IPTables keeps track of
> the number of packets and bytes of packets matching a rule. There are
> two things that you need to keep in mind:
> 1) The values will roll-over at some point. I would recommend saving
> and then resetting the values every week or so.
> 2) Your distribution might not save the current chains and packet
> counts at shutdown/restart. You would need to modify your start up
> scripts as needed.
Alternatively you can obtain values directly from /proc/net/dev. This is
more lightweight than iptables but depending on what you want to do with
the data afterwards may require more post-processing. ucd-snmp will do
this for you if exposing the values via SNMP is what you're after, or
mrtg can use them directly via mrtg-ip-acct (in the mrtgutils package in
Debian, at least).
I'm sure other monitoring applications such as cacti can do similar.
/proc/net/dev is easily parsable textual data so it should be easy to
extract the information into whatever form you need.
This is all in dom0, of course.
Remember that you can name the virtual interfaces on the dom0 side
whatever you want in the config file for the domUs.
Dominic.
--
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|