API: Where can I interogate physical memory of a hypervisor ?
Hello
Running the below query against the RestAPI we can gain details of the hypervisor hardware :-
https://lhprevm01.pgds.local:8443/api/hosts?search=rhphyp01a.pgds.local
The query returns details including CPU type, number of cores and speed but nothing about physical memory installed.
What query should we be running to get this information ?
Thanks
Responses
Hi Richard,
I think you should try this:
https://lhprevm01.pgds.local:8443/api/hosts/<HOSTID_of_rhphyp01a.pgds.local>/statistics
Vincent
Richard,
The query you posted should show physical memory installed on the host. Just to verify, I ran the same query in my environment as shown below:
curl --cacert $cert -u "$user:$password" -H "Content-Type: application/xml" -X GET https://$rhevm_host/api/hosts?search=$hostname
The XML output for $hostname is presented. You should see the physical memory listed as <memory>$amount_of_ram</memory>. Not sure what version of RHEV you're running but I tested with RHEV 3. Hope this helps.
Tony
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
