Sijo Jose
2014-Jul-09 11:28 UTC
[libvirt-users] Disk and Network Statistics for a Specific Interval
Hi, virDomainInterfaceStats - This function returns network interface stats for interfaces attached to the domain. virDomainBlockStats- This function returns block device (disk) stats for block devices attached to the domain. Based on which time interval these function returns values. Is it cumulative from the vms uptime..? OR average ...? How can I get the average statistics of Disk and Network for a specific time interval say time x to time y ..? Regards -Sijo
Eric Blake
2014-Jul-09 13:23 UTC
Re: [libvirt-users] Disk and Network Statistics for a Specific Interval
On 07/09/2014 05:28 AM, Sijo Jose wrote:> Hi, > virDomainInterfaceStats - This function returns network interface stats for > interfaces attached to the domain. > > virDomainBlockStats- This function returns block device (disk) stats for > block devices attached to the domain. > > Based on which time interval these function returns values. > > > Is it cumulative from the vms uptime..? > OR average ...?Cumulative.> > > How can I get the average statistics of Disk and Network for a specific > time interval say time x to time y ..?Call it twice in a row, subtract the two numbers, and divide by the time between the two calls. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Michal Privoznik
2014-Jul-09 15:15 UTC
Re: [libvirt-users] Disk and Network Statistics for a Specific Interval
On 09.07.2014 15:23, Eric Blake wrote:> On 07/09/2014 05:28 AM, Sijo Jose wrote: >> Hi, >> virDomainInterfaceStats - This function returns network interface stats for >> interfaces attached to the domain. >> >> virDomainBlockStats- This function returns block device (disk) stats for >> block devices attached to the domain. >> >> Based on which time interval these function returns values. >> >> >> Is it cumulative from the vms uptime..? >> OR average ...? > > Cumulative. > >> >> >> How can I get the average statistics of Disk and Network for a specific >> time interval say time x to time y ..? > > Call it twice in a row, subtract the two numbers, and divide by the time > between the two calls. >Just a side node, This question is being asked more and more frequently. Is there something we can do about it, e.g. a demo under examples/ ? Michal
Seemingly Similar Threads
- Disk and Network Statistics for a Specific Interval
- HDD- and NIC-stats for dom0
- Re: data monitored by "virDomainBlockStats" API not consistent with ones reading from /proc/[pid]/io, and corrugated with /proc/diskstats
- Re: [libvirt] Python-libvirt in a virtual environment.
- Unable to collect VM metrics for ESX using libvirt