mirror of
https://github.com/php/pecl-virtualization-libvirt.git
synced 2026-03-27 08:42:16 +01:00
121 lines
2.8 KiB
XML
121 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision: 1.28 $ -->
|
|
|
|
<refentry xml:id="function.libvirt-node-get-info" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>libvirt_node_get_info</refname>
|
|
<refpurpose>Extract hardware information about the node</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>Array</type><methodname>libvirt_node_get_info</methodname>
|
|
<methodparam ><type>resource</type><parameter>connection</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Extract hardware information about the node (machine running the hypervisor).
|
|
</para>
|
|
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>connection</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Connection resource of hypervisor.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<!-- See also &return.success; -->
|
|
<para>
|
|
&false; is returned on failure. On success associative array containing information is returned.
|
|
</para>
|
|
<para>
|
|
The array contains these values:
|
|
<simplelist>
|
|
<member>model - string indicating the CPU model</member>
|
|
<member>memory - memory size in kilobytes</member>
|
|
<member>cpus - the number of active CPUs</member>
|
|
<member>mhz - expected CPU frequency</member>
|
|
<member>nodes - the number of NUMA cell, 1 for uniform mem access</member>
|
|
<member>sockets - number of CPU socket per node</member>
|
|
<member>cores - number of core per socket</member>
|
|
<member>threads - number of threads per core</member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>libvirt_node_get_info</function> example</title>
|
|
<para>
|
|
Example of getting hardware info for active hypervisor.
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$nodeinfo=libvirt_node_get_info($res);
|
|
print_r($nodeinfo);
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
(
|
|
[model] => x86_64
|
|
[memory] => 3077804
|
|
[cpus] => 2
|
|
[nodes] => 1
|
|
[sockets] => 1
|
|
[cores] => 2
|
|
[threads] => 1
|
|
[mhz] => 1700
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|