Libvirt Functions
PHP Manual

libvirt_node_get_info

(php-libvirt 0.1)

libvirt_node_get_infoExtract hardware information about the node

Description

Array libvirt_node_get_info ( resource $connection )

Extract hardware information about the node (machine running the hypervisor).

Parameters

connection

Connection resource of hypervisor.

Return Values

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

The array contains these values:

Examples

Example #1 libvirt_node_get_info() example

Example of getting hardware info for active hypervisor.

<?php

    $nodeinfo
=libvirt_node_get_info($res);
    
print_r($nodeinfo);

?>

The above example will output something similar to:

(
    [model] => x86_64
    [memory] => 3077804
    [cpus] => 2
    [nodes] => 1
    [sockets] => 1
    [cores] => 2
    [threads] => 1
    [mhz] => 1700
)


Libvirt Functions
PHP Manual