[vbox-dev] Setting IPerformance interval using webservice

Joseph Smith joseph1962smith at yahoo.com
Tue Feb 9 06:12:52 PST 2010


I've been trying to set the IPerformance collector interval via the webservice API and somehow have not been able to do so.  No exceptions are thrown and in fact, the responses are all as documented ... but still unable to set the interval.

As so often recommended, I looked closely at the way VBoxManage does it ... and I'm doing the same thing (well ... it sure seems like I am).

By setting the interval and samples using VBoxManage, I can retrieve all the expected performance data using the webservice and they report exactly the same values VBoxManage does.

The steps I am taking are:

1) Get the IPerformance handle from IVirtualBox::performanceCollector

2) Determine the statistics I want to collect (actually, I use the metricNames method on the IPerformance Handle object which
 retreives all the supported names)

3) Set the metrics using the IPerformance handle from step 1:  Handle->setupMetrics.  I set the same period and count I use when doing this via VBoxManage.  I also pass the objects for the host and various selected VMs

4) I call enable metrics with the list of metrics I want to collect and the same list of objects for the host and selected VMs.

5) I then periodically call the queryMetricsData method of the performance handle  with the same list of metrics and objects for the selected VMs.

Unfortunately ... because it appears the period and count are not being set ... No data is ever returned.

NOTE: Leaving this running (meaning not restarting) .. and then going to the comand-line and using VBoxManage to set the period and count for the host and VMs of choice ... I am immediately able to get data and the data matches exactly the same reported by

So ... I'm sure I must be missing something somewhere ... but I sure can't see it ...

Any suggestions or ideas?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100209/d4d70d10/attachment-0001.html 

More information about the vbox-dev mailing list