<div dir="ltr">Thank you for the reply!<div><br></div><div>I used the term "disk usage" as what you mentioned first; the information which can be retrieved via 'df' command on linux system...</div><div><br></div><div>I'll then have to consider different approach to do what I want.</div><div><br></div><div>Anyway, thanks again for your great help.</div><div><br></div><div>Best regards</div><div><br></div><div>bgkim</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-04 22:21 GMT+09:00 Michal Privoznik <span dir="ltr"><<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 04.01.2016 01:19, BYEONG-GI KIM wrote:<br>
> Hello. I'm a new getting started to learn the libvirt API.<br>
><br>
> I've tried to find APIs which retrieve resource metrics such as cpu, disk,<br>
> memory, and network I/O usages, but I could find few related thing; I was<br>
> intended to use libvirt-Java binding first, it seems I'd be better to use<br>
> the others like Python binding or C API though. The Java binding API is<br>
> likely to provide very limited API list comparing with the above APIs so<br>
> far.<br>
><br>
> So, I'd like to know which APIs can retrieve that resources from VMs. I<br>
> don't care about the language, but I really want to know whether such APIs<br>
> even exists or not.<br>
><br>
> As far as I know, cpu, memory, and network I/O seems being provided, but<br>
> I'm not sure disk usage per VMs can be obtained via libvirt API.<br>
<br>
</span>I'm not sure what do you mean by 'disk usage'. You mean like 'how many<br>
bytes are used/free on a disk'? If so, I'm not sure libvirt can help. I<br>
mean it's dependent on guest configuration and you should use 'df' ran<br>
from within guest to retrieve that info. It falls out of libvirt's scope.<br>
<br>
If you, however, mean disk I/O - this can be obtained via<br>
virDomainBlockStatsFlags() API.<br>
<span class="HOEnZb"><font color="#888888"><br>
Michal<br>
</font></span></blockquote></div><br></div>