Hi Joe,
Could you post the code fragment that does it? It would be much easier
to understand what is wrong. Btw do you ever let go of the
IPerformance handle? Because if you do the process on the server end
will die shortly and all the settings will be lost. The settings are
not persistent.
Regards,
Aleksey
On Feb 9, 2010, at 5:12 PM, Joseph Smith wrote:
Hi,
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 VBoxManage.
So ... I'm sure I must be missing something somewhere ... but I sure
can't see it ...
Any suggestions or ideas?
Thanks,
Joe
_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev
_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev