Re: API Question...

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

 



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

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]