(php-libvirt 0.1)
libvirt_domain_get_info — Extract information about a domain
Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.
Domain resource of domain to get information for.
FALSE is returned on failure. On success associative array containing information is returned.
The array contains these values:
Example #1 libvirt_domain_get_info() example
Example of getting domain info for domain named test
.
<?php
$dom=libvirt_domain_lookup_by_name($connection,"test");
$dominfo=libvirt_domain_get_info($dom);
print_r($dominfo);
?>
The above example will output something similar to:
Array ( [maxMem] => 1048576 [memory] => 524288 [state] => 1 [nrVirtCpu] => 2 [cpuUsed] => 98718.23 )