Libvirt Functions
PHP Manual

libvirt_storagepool_get_info

(php-libvirt 0.4)

libvirt_storagepool_get_infoGet storagepool information

Description

array libvirt_storagepool_get_info ( resource $connection )

This function returns array containing storagepool information

Note: Warning
. This function returns values that may be bigger than 32bit integer limit. Please read this note for more details.

Parameters

connection

Connection resource of storagepool

Return Values

Array with storagepool information. FALSE on failure

Examples

Example #1 libvirt_storagepool_get_info() example

Connection resource of storagepool

<?php

    $conn
=libvirt_connect($uri,true);
    
$pool=libvirt_storagepools_lookup_by_name($conn,'default');
    
$poolInfo libvirt_storagepool_get_info($pool)

    
var_dump($poolInfo);
?>

The above example will output something similar to:

array(4) {
  ["state"]=>
  int(2)
  ["capacity"]=>
  int(118996598784)
  ["allocation"]=>
  int(34414264320)
  ["available"]=>
  int(84582334464)
}

See Also


Libvirt Functions
PHP Manual