Extract hardware information about the node

libvirt_list_volumes
libvirt_storagepool_get_info
Libvirt Functions
PHP Manual

# libvirt_node_get_info

(php-libvirt 0.1)

libvirt_node_get_info — Extract 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:

- model - string indicating the CPU model
- memory - memory size in kilobytes
- cpus - the number of active CPUs
- mhz - expected CPU frequency
- nodes - the number of NUMA cell, 1 for uniform mem access
- sockets - number of CPU socket per node
- cores - number of core per socket
- threads - number of threads per core

### 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_list_volumes
libvirt_storagepool_get_info
Libvirt Functions
PHP Manual