File: function.libvirt-domain-memory-stats.html

package info (click to toggle)
libvirt-php 0.5.2~30-g64dca6f-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,460 kB
  • ctags: 5,538
  • sloc: cpp: 11,159; ansic: 8,250; xml: 3,999; php: 1,604; sh: 580; makefile: 189; perl: 97
file content (128 lines) | stat: -rw-r--r-- 6,267 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>provide memory statistics for the domain.</title>
 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.libvirt-domain-memory-peek.html">libvirt_domain_memory_peek</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.libvirt-domain-migrate-to-uri.html">libvirt_domain_migrate_to_uri</a></div>
 <div class="up"><a href="ref.libvirt.html">Libvirt Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.libvirt-domain-memory-stats" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">libvirt_domain_memory_stats</h1>
  <p class="verinfo">(php-libvirt 0.3)</p><p class="refpurpose"><span class="refname">libvirt_domain_memory_stats</span> &mdash; <span class="dc-title">provide memory statistics for the domain.</span></p>

 </div>

 <a name="function.libvirt-domain-memory-stats.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><b>libvirt_domain_memory_stats</b></span>
    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$domain</tt></span>
   [, <span class="methodparam"><span class="type">integer</span> <tt class="parameter">$flags</tt><span class="initializer">= 0</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   This function provides memory statistics for the domain. Up to <b><tt class="constant">VIR_DOMAIN_MEMORY_STAT_NR</tt></b> elements will be populated in the returned array with memory statistics from the domain. Only statistics supported by the domain, the driver, and this version of libvirt will be returned. The array is indexed by the numerical values of appropriate constants.
   
   </p><table class="doctable table"><caption><b>Possible members of the array returned by libvirt_domain_memory_stats</b></caption>
  
<tbody valign="middle" class="tbody">
<tr valign="middle"><td align="left"><b><tt class="constant">VIR_DOMAIN_MEMORY_STAT_SWAP_IN</tt></b></td><td align="left">The total amount of data read from swap space (in kb)</td></tr>

<tr valign="middle"><td align="left"><b><tt class="constant">VIR_DOMAIN_MEMORY_STAT_SWAP_OUT</tt></b></td><td align="left">The total amount of memory written out to swap space (in kb)</td></tr>

<tr valign="middle"><td align="left"><b><tt class="constant">VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT</tt></b></td><td align="left">The number of page faults that required disk IO to service.</td></tr>

<tr valign="middle"><td align="left"><b><tt class="constant">VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT</tt></b></td><td align="left">The number of page faults serviced without disk IO.</td></tr>

<tr valign="middle"><td align="left"><b><tt class="constant">VIR_DOMAIN_MEMORY_STAT_UNUSED</tt></b></td><td align="left">The amount of memory which is not being used for any purpose (in kb).</td></tr>

<tr valign="middle"><td align="left"><b><tt class="constant">VIR_DOMAIN_MEMORY_STAT_AVAILABLE</tt></b></td><td align="left">The total amount of memory available to the domain&#039;s OS (in kb).</td></tr>

<tr valign="middle"><td align="left"><b><tt class="constant">VIR_DOMAIN_MEMORY_STAT_NR</tt></b></td><td align="left">.</td></tr>

</tbody>

</table>
<p>
   
   </p>
   <blockquote><p><b class="note">Note</b>: <b>Warning</b><br />
.
This function returns values that may be bigger than 32bit integer limit. Please read this <a href="libvirt.longlong.html" class="link">note</a> for more details.
<br />
</p></blockquote>
 <blockquote><p><b class="note">Note</b>: <b>Libvirt version</b><br />
 
This function has been added to Libvirt in version 0.7.5. You need this or newer version of Libvirt to be able to use this function. 
<br />
</p></blockquote>
 </div>


 <a name="function.libvirt-domain-memory-stats.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
 <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">domain</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       Domain resource of domain to get memory stats.
      </p>
     </dd>

    
     <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">flags</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       unused, always pass 0 (or ommit the parameter as 0 is default value
      </p>
     </dd>

    
   </dl>
<p>
  </p>
 </div>


 <a name="function.libvirt-domain-memory-stats.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  
  <p class="para">
   Array containig  Up to <b><tt class="constant">VIR_DOMAIN_MEMORY_STAT_NR</tt></b> elements with statistics. 
  </p>
 </div>



 <a name="function.libvirt-domain-memory-stats.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.libvirt-domain-block-stats.html" class="function" rel="rdfs-seeAlso">libvirt_domain_block_stats()</a> - provide block device statistics for the block device on domain.</li>
    <li class="member"><a href="function.libvirt-domain-interface-stats.html" class="function" rel="rdfs-seeAlso">libvirt_domain_interface_stats()</a> - provide interface statistics for the virtual network interface on domain.</li>
   </ul><p>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.libvirt-domain-memory-peek.html">libvirt_domain_memory_peek</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.libvirt-domain-migrate-to-uri.html">libvirt_domain_migrate_to_uri</a></div>
 <div class="up"><a href="ref.libvirt.html">Libvirt Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>