Libvirt Functions
PHP Manual

libvirt_domain_get_info

(php-libvirt 0.1)

libvirt_domain_get_infoExtract information about a domain

Description

Array libvirt_domain_get_info ( resource $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.

Parameters

domain

Domain resource of domain to get information for.

Return Values

FALSE is returned on failure. On success associative array containing information is returned.

The array contains these values:

Examples

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
)

See Also


Libvirt Functions
PHP Manual