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

Re: [Libvir] API Question...



On Mon, Mar 03, 2008 at 02:52:05PM -0700, Spencer Parker wrote:
> Okay...so I am still trying to get what this says I can get.  But I want to 
> do it with Python.  I am looking at this: virDomainInterfaceStatsStruct and 
> wondering if I can grab this info with Python or not.  I looked at the 
> libvirt module, but I don't see how I would grab this.  Any ideas?

This call is provided through Python so you should just be able to use
it.

dom.interfaceStats (path)
  'dom' is your domain object, 'path' is the path (see <target
  dev="path"> in the domain XML).

AIUI the python call will return an 8 element tuple, with the elements
being:

  (rx_bytes, rx_packets, rx_errs, rx_drop,
   tx_bytes, tx_packets, tx_errs, tx_drop)

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v


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