https://wiki.xenproject.org/index.php?title=XAPI_RRDs&feed=atom&action=history
XAPI RRDs - Revision history
2024-03-28T23:16:24Z
Revision history for this page on the wiki
MediaWiki 1.31.3
https://wiki.xenproject.org/index.php?title=XAPI_RRDs&diff=9467&oldid=prev
Lars.kurth at 12:43, 11 July 2013
2013-07-11T12:43:44Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 12:43, 11 July 2013</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><!-- MoinMoin name: XAPI_RRDs --></div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><!-- Comment: Added definitions of counters --></div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><!-- WikiMedia name: XAPI RRDs --></div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><!-- Page revision: 00000004 --></div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><!-- Original date: Tue May 31 11:42:05 2011 (1306842125000000) --></div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>__NOTOC__</div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>xapi stores persistent performance data in 'round robin databases' (RRDs). Each of these is a fixed size structure containing data at multiple resolutions. 'Data sources' are sampled every few seconds and points are added to the highest resolution RRD. Periodically each high-frequency RRD is 'consolidated' (e.g. averaged) to produce a data point for a lower-frequency RRD.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>xapi stores persistent performance data in 'round robin databases' (RRDs). Each of these is a fixed size structure containing data at multiple resolutions. 'Data sources' are sampled every few seconds and points are added to the highest resolution RRD. Periodically each high-frequency RRD is 'consolidated' (e.g. averaged) to produce a data point for a lower-frequency RRD.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 368:</td>
<td colspan="2" class="diff-lineno">Line 361:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:XAPI Devel]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:XAPI Devel]]</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Developers]]</div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Design Document]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Design Document]]</div></td>
</tr>
</table>
Lars.kurth
https://wiki.xenproject.org/index.php?title=XAPI_RRDs&diff=9449&oldid=prev
Lars.kurth at 12:13, 11 July 2013
2013-07-11T12:13:39Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 12:13, 11 July 2013</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 367:</td>
<td colspan="2" class="diff-lineno">Line 367:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>http://community.citrix.com/display/xs/Using+[[XenServer]]+RRDs</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>http://community.citrix.com/display/xs/Using+[[XenServer]]+RRDs</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<del class="diffchange diffchange-inline">XCP</del>]]</div></td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<ins class="diffchange diffchange-inline">XAPI Devel</ins>]]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Developers]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Developers]]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Design Document]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Design Document]]</div></td>
</tr>
</table>
Lars.kurth
https://wiki.xenproject.org/index.php?title=XAPI_RRDs&diff=7766&oldid=prev
Colin: /* Definitions of counters */
2013-05-07T03:59:51Z
<p><span dir="auto"><span class="autocomment">Definitions of counters</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 03:59, 7 May 2013</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 327:</td>
<td colspan="2" class="diff-lineno">Line 327:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| memory </div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| memory </div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| Memory currently allocated to VM(Bytes)</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| memory_target </div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| memory_target </div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| memory_internal_free </div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| memory_internal_free </div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| Free memory size(KB) reported by the guest agent </div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| vif_IF_tx </div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| vif_IF_tx </div></td>
</tr>
</table>
Colin
https://wiki.xenproject.org/index.php?title=XAPI_RRDs&diff=830&oldid=prev
GarveyPatrickD: Removed superfluous <nowiki></nowiki> tag pairs.
2011-11-29T02:02:13Z
<p>Removed superfluous <nowiki></nowiki> tag pairs.</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 02:02, 29 November 2011</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 25:</td>
<td colspan="2" class="diff-lineno">Line 25:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><pre<del class="diffchange diffchange-inline">><nowiki</del>></div></td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><?xml version="1.0"?></div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><?xml version="1.0"?></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><rrd></div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><rrd></div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 82:</td>
<td colspan="2" class="diff-lineno">Line 82:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ... other archives ...</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ... other archives ...</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></rrd></div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></rrd></div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"></nowiki></del></pre></div></td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Example rrd_updates - only 1 VM present, no host updates:</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Example rrd_updates - only 1 VM present, no host updates:</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><pre<del class="diffchange diffchange-inline">><nowiki</del>></div></td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><xport></div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><xport></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <meta></div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <meta></div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 129:</td>
<td colspan="2" class="diff-lineno">Line 129:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </data></div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </data></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></xport></div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></xport></div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"></nowiki></del></pre></div></td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Here is some sample python code to read and parse the rrd_updates - it uses the local domain socket to log in to xapi, and hence the code must be executed on the server. To modify it to work off-box, simply change the bit that gets the session and the URI it's requesting:</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Here is some sample python code to read and parse the rrd_updates - it uses the local domain socket to log in to xapi, and hence the code must be executed on the server. To modify it to work off-box, simply change the bit that gets the session and the URI it's requesting:</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><pre<del class="diffchange diffchange-inline">><nowiki</del>></div></td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#!/usr/bin/python</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#!/usr/bin/python</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 284:</td>
<td colspan="2" class="diff-lineno">Line 284:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> print data</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> print data</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>main()</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>main()</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"></nowiki></del></pre></div></td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Definitions of counters ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Definitions of counters ==</div></td>
</tr>
</table>
GarveyPatrickD
https://wiki.xenproject.org/index.php?title=XAPI_RRDs&diff=607&oldid=prev
94.5.117.176: Created page with "<!-- MoinMoin name: XAPI_RRDs --> <!-- Comment: Added definitions of counters --> <!-- WikiMedia name: XAPI RRDs --> <!-- Page revision: 00000004 --> <!-- Original date:…"
2011-11-13T18:29:55Z
<p>Created page with "<!-- MoinMoin name: XAPI_RRDs --> <!-- Comment: Added definitions of counters --> <!-- WikiMedia name: XAPI RRDs --> <!-- Page revision: 00000004 --> <!-- Original date:…"</p>
<p><b>New page</b></p><div><!-- MoinMoin name: XAPI_RRDs --><br />
<!-- Comment: Added definitions of counters --><br />
<!-- WikiMedia name: XAPI RRDs --><br />
<!-- Page revision: 00000004 --><br />
<!-- Original date: Tue May 31 11:42:05 2011 (1306842125000000) --><br />
<br />
__NOTOC__<br />
xapi stores persistent performance data in 'round robin databases' (RRDs). Each of these is a fixed size structure containing data at multiple resolutions. 'Data sources' are sampled every few seconds and points are added to the highest resolution RRD. Periodically each high-frequency RRD is 'consolidated' (e.g. averaged) to produce a data point for a lower-frequency RRD.<br />
<br />
Jon Ludlam writes:<br />
<br />
RRDs are maintained for individual VMs (including dom0) and the host. Internally, the RRD is updated and maintained by a module similar to (but not actually) rrdtool (http://oss.oetiker.ch/rrdtool/). RRDs are resident on the host on which the VM is running, or the pool master when the VM is not running. For this reason, to obtain the data requires knowledge of where the VM is running.<br />
<br />
The RRDs can be extracted via a http handler registered at /host_rrd or /vm_rrd. Both of these require authentication to retrieve the data, either by use of http auth, or by a XenAPI session. The session authentication works by passing the '[[OpaqueRef]]:...' as the query parameter 'session_id'. The vm_rrd handler requires the uuid of the VM, passed by the query parameter 'uuid'. As an example, connecting to the URI 'http://<server>/host_rrd' using a web browser will prompt for a username and password, then get an XML dump of the RRD. This XML is documented on the rrdtool webpage, and can be imported into rrdtool itself for further analysis. Example URIs:<br />
<br />
http://localhost/host_rrd?session_id=[[OpaqueRef]]:abcd.... http://localhost/vm_rrd?uuid=abcd...&session_id=[[OpaqueRef]]:cdef...<br />
<br />
It's my expectation that this won't be used as often as the following updates URI.<br />
<br />
Recent updates to the RRDs can also be queried so that the entire RRD does not need to be downloaded when you already have most of the data. This is via another http handler: /rrd_updates. Once again this needs to be authenticated either using a session or http auth. The parameter 'start' needs to be provided, and is a Unix-type 'number of seconds since Jan 1 1970'. This will provide data in an rrdtool 'xport' style xml format, for every VM resident on the particular host that is being queried. In order to differentiate which column in the export is associated with which VM, the 'legend' field is prefixed with the VM's uuid. Also the type of archive from which it came is also prefixed, e.g. AVERAGE or MIN, etc. To obtain host updates too, use the query parameter 'host=true'. Example URI:<br />
<br />
http://localhost/rrd_updates?session_id=...&cf=AVERAGE&start=1000000000&host=true<br />
<br />
Example host rrd (note that a VM rrd is identically structured, but with different data sources):<br />
<br />
<br />
<pre><nowiki><br />
<?xml version="1.0"?><br />
<rrd><br />
<version>0003</version><br />
<step>5</step><br />
<lastupdate>1213616574</lastupdate><br />
<ds><br />
<name>memory_total_kib</name><br />
<type>GAUGE</type><br />
<minimal_heartbeat>300.0000</minimal_heartbeat><br />
<min>0.0</min><br />
<max>Infinity</max><br />
<last_ds>2070172</last_ds><br />
<value>9631315.6300</value><br />
<unknown_sec>0</unknown_sec><br />
</ds><br />
<ds><br />
<!-- other dss - the order of the data sources is important<br />
and defines the ordering of the columns in the archives below --><br />
</ds><br />
<rra><br />
<cf>AVERAGE</cf><br />
<pdp_per_row>1</pdp_per_row><br />
<params><br />
<xff>0.5000</xff><br />
</params><br />
<cdp_prep> <!-- This is for internal use --><br />
<ds><br />
<primary_value>0.0</primary_value><br />
<secondary_value>0.0</secondary_value><br />
<value>0.0</value><br />
<unknown_datapoints>0</unknown_datapoints><br />
</ds><br />
...other dss - internal use only...<br />
</cdp_prep><br />
<database><br />
<row><br />
<v>2070172.0000</v> <!-- columns correspond to the DSs defined above --><br />
<v>1756408.0000</v><br />
<v>0.0</v><br />
<v>0.0</v><br />
<v>732.2130</v><br />
<v>0.0</v><br />
<v>782.9186</v><br />
<v>0.0</v><br />
<v>647.0431</v><br />
<v>0.0</v><br />
<v>0.0001</v><br />
<v>0.0268</v><br />
<v>0.0100</v><br />
<v>0.0</v><br />
<v>615.1072</v><br />
</row><br />
...<br />
</rra><br />
... other archives ...<br />
</rrd><br />
</nowiki></pre><br />
<br />
Example rrd_updates - only 1 VM present, no host updates:<br />
<br />
<br />
<pre><nowiki><br />
<xport><br />
<meta><br />
<start>1213578000</start><br />
<step>3600</step><br />
<end>1213617600</end><br />
<rows>12</rows><br />
<columns>12</columns><br />
<legend><br />
<entry>AVERAGE:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu1</entry> <!-- nb - each data source might have multiple entries for different consolidation functions --><br />
<entry>AVERAGE:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu0</entry><br />
<entry>AVERAGE:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:memory</entry><br />
<entry>MIN:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu1</entry><br />
<entry>MIN:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu0</entry><br />
<entry>MIN:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:memory</entry><br />
<entry>MAX:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu1</entry><br />
<entry>MAX:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu0</entry><br />
<entry>MAX:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:memory</entry><br />
<entry>LAST:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu1</entry><br />
<entry>LAST:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu0</entry><br />
<entry>LAST:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:memory</entry><br />
</legend><br />
</meta><br />
<data><br />
<row><br />
<t>1213617600</t><br />
<v>0.0</v> <!-- once again, the order or the columns is defined by the legend above --><br />
<v>0.0282</v><br />
<v>209715200.0000</v><br />
<v>0.0</v><br />
<v>0.0201</v><br />
<v>209715200.0000</v><br />
<v>0.0</v><br />
<v>0.0445</v><br />
<v>209715200.0000</v><br />
<v>0.0</v><br />
<v>0.0243</v><br />
<v>209715200.0000</v><br />
</row><br />
...<br />
</data><br />
</xport><br />
</nowiki></pre><br />
<br />
Here is some sample python code to read and parse the rrd_updates - it uses the local domain socket to log in to xapi, and hence the code must be executed on the server. To modify it to work off-box, simply change the bit that gets the session and the URI it's requesting:<br />
<br />
<br />
<pre><nowiki><br />
#!/usr/bin/python<br />
#<br />
# Example code for reading RRDs<br />
# Contact: Jon Ludlam (jonathan.ludlam@eu.citrix.com)<br />
#<br />
# Mostly this script is taken from perfmon, by Alex Zeffert<br />
#<br />
import XenAPI<br />
import urllib<br />
from xml.dom import minidom<br />
from xml.parsers.expat import ExpatError<br />
import time<br />
# Per VM dictionary (used by RRDUpdates to look up column numbers by variable names)<br />
class VMReport(dict):<br />
"""Used internally by RRDUpdates"""<br />
def __init__(self, uuid):<br />
self.uuid = uuid<br />
# Per Host dictionary (used by RRDUpdates to look up column numbers by variable names)<br />
class HostReport(dict):<br />
"""Used internally by RRDUpdates"""<br />
def __init__(self, uuid):<br />
self.uuid = uuid<br />
class RRDUpdates:<br />
""" Object used to get and parse the output the http://localhost/rrd_udpates?...<br />
"""<br />
def __init__(self):<br />
# params are what get passed to the CGI executable in the URL<br />
self.params = dict()<br />
self.params['start'] = int(time.time()) - 1000 # For demo purposes!<br />
self.params['host'] = 'true' # include data for host (as well as for VMs)<br />
self.params['cf'] = 'AVERAGE' # consolidation function, each sample averages 12 from the 5 second RRD<br />
self.params['interval'] = '60'<br />
def get_nrows(self):<br />
return self.rows<br />
def get_vm_list(self):<br />
return self.vm_reports.keys()<br />
def get_vm_param_list(self, uuid):<br />
report = self.vm_reports[uuid]<br />
if not report:<br />
return []<br />
return report.keys()<br />
def get_vm_data(self, uuid, param, row):<br />
report = self.vm_reports[uuid]<br />
col = report[param]<br />
return self.__lookup_data(col, row)<br />
def get_host_uuid(self):<br />
report = self.host_report<br />
if not report:<br />
return None<br />
return report.uuid<br />
def get_host_param_list(self):<br />
report = self.host_report<br />
if not report:<br />
return []<br />
return report.keys()<br />
def get_host_data(self, param, row):<br />
report = self.host_report<br />
col = report[param]<br />
return self.__lookup_data(col, row)<br />
def get_row_time(self,row):<br />
return self.__lookup_timestamp(row)<br />
# extract float from value (<v>) node by col,row<br />
def __lookup_data(self, col, row):<br />
# Note: the <rows> nodes are in reverse chronological order, and comprise<br />
# a timestamp <t> node, followed by self.columns data <v> nodes<br />
node = self.data_node.childNodes[self.rows - 1 - row].childNodes[col+1]<br />
return float(node.firstChild.toxml()) # node.firstChild should have nodeType TEXT_NODE<br />
# extract int from value (<t>) node by row<br />
def __lookup_timestamp(self, row):<br />
# Note: the <rows> nodes are in reverse chronological order, and comprise<br />
# a timestamp <t> node, followed by self.columns data <v> nodes<br />
node = self.data_node.childNodes[self.rows - 1 - row].childNodes[0]<br />
return int(node.firstChild.toxml()) # node.firstChild should have nodeType TEXT_NODE<br />
def refresh(self, session, override_params = {}):<br />
params = override_params<br />
params['session_id'] = session<br />
params.update(self.params)<br />
paramstr = "&".join(["%s=%s" % (k,params[k]) for k in params])<br />
# this is better than urllib.urlopen() as it raises an Exception on http 401 'Unauthorised' error<br />
# rather than drop into interactive mode<br />
sock = urllib.URLopener().open("http://localhost/rrd_updates?%s" % paramstr)<br />
xmlsource = sock.read()<br />
sock.close()<br />
xmldoc = minidom.parseString(xmlsource)<br />
self.__parse_xmldoc(xmldoc)<br />
# Update the time used on the next run<br />
self.params['start'] = self.end_time + 1 # avoid retrieving same data twice<br />
def __parse_xmldoc(self, xmldoc):<br />
# The 1st node contains meta data (description of the data)<br />
# The 2nd node contains the data<br />
self.meta_node = xmldoc.firstChild.childNodes[0]<br />
self.data_node = xmldoc.firstChild.childNodes[1]<br />
def lookup_metadata_bytag(name):<br />
return int (self.meta_node.getElementsByTagName(name)[0].firstChild.toxml())<br />
# rows = number of samples per variable<br />
# columns = number of variables<br />
self.rows = lookup_metadata_bytag('rows')<br />
self.columns = lookup_metadata_bytag('columns')<br />
# These indicate the period covered by the data<br />
self.start_time = lookup_metadata_bytag('start')<br />
self.step_time = lookup_metadata_bytag('step')<br />
self.end_time = lookup_metadata_bytag('end')<br />
# the <legend> Node describes the variables<br />
self.legend = self.meta_node.getElementsByTagName('legend')[0]<br />
# vm_reports matches uuid to per VM report<br />
self.vm_reports = {}<br />
# There is just one host_report and its uuid should not change!<br />
self.host_report = None<br />
# Handle each column. (I.e. each variable)<br />
for col in range(self.columns):<br />
self.__handle_col(col)<br />
def __handle_col(self, col):<br />
# work out how to interpret col from the legend<br />
col_meta_data = self.legend.childNodes[col].firstChild.toxml()<br />
# vm_or_host will be 'vm' or 'host'. Note that the Control domain counts as a VM!<br />
(cf, vm_or_host, uuid, param) = col_meta_data.split(':')<br />
if vm_or_host == 'vm':<br />
# Create a report for this VM if it doesn't exist<br />
if not self.vm_reports.has_key(uuid):<br />
self.vm_reports[uuid] = VMReport(uuid)<br />
# Update the VMReport with the col data and meta data<br />
vm_report = self.vm_reports[uuid]<br />
vm_report[param] = col<br />
elif vm_or_host == 'host':<br />
# Create a report for the host if it doesn't exist<br />
if not self.host_report:<br />
self.host_report = HostReport(uuid)<br />
elif self.host_report.uuid != uuid:<br />
raise PerfMonException, "Host UUID changed: (was %s, is %s)" % (self.host_report.uuid, uuid)<br />
# Update the HostReport with the col data and meta data<br />
self.host_report[param] = col<br />
else:<br />
raise PerfMonException, "Invalid string in <legend>: %s" % col_meta_data<br />
def main():<br />
xapi = XenAPI.xapi_local();<br />
xapi.login_with_password("","")<br />
session=xapi._session<br />
rrd_updates = RRDUpdates()<br />
rrd_updates.refresh(session,{})<br />
for uuid in rrd_updates.get_vm_list():<br />
print "Got values for VM: "+uuid<br />
for param in rrd_updates.get_vm_param_list(uuid):<br />
print "param: "+param<br />
data=""<br />
for row in range(rrd_updates.get_nrows()):<br />
data=data+"(%d,%f) " % (rrd_updates.get_row_time(row),<br />
rrd_updates.get_vm_data(uuid,param,row))<br />
print data<br />
main()<br />
</nowiki></pre><br />
<br />
== Definitions of counters ==<br />
<br />
Host<br />
{| border="1" cellpadding="2" cellspacing="0"<br />
| memory_total_kib <br />
|-<br />
| memory_free_kib <br />
|-<br />
| xapi_memory_usage_kib <br />
|-<br />
| xapi_free_memory_kib <br />
|-<br />
| xapi_live_memory_kib <br />
|-<br />
| xapi_allocation_kib <br />
|-<br />
| cpuN <br />
|-<br />
| loadavg <br />
|-<br />
| pif_IF_rx <br />
|-<br />
| pif_IF_tx <br />
|-<br />
| pif_IF_rx_errors <br />
|-<br />
| pif_IF_tx_errors <br />
|-<br />
| sr_SR_cache_size <br />
|-<br />
| sr_SR_cache_hits <br />
|-<br />
| sr_SR_cache_misses <br />
|}<br />
<br />
VM<br />
<br />
{| border="1" cellpadding="2" cellspacing="0"<br />
| cpuN <br />
|-<br />
| memory <br />
|-<br />
| memory_target <br />
|-<br />
| memory_internal_free <br />
|-<br />
| vif_IF_tx <br />
|-<br />
| vif_IF_rx <br />
|-<br />
| vif_IF_tx_errors <br />
|-<br />
| vif_IF_rx_errors <br />
|-<br />
| vbd_DEV_write <br />
|-<br />
| vbd_DEV_read <br />
|-<br />
| vbd_DEV_write_latency <br />
|-<br />
| vbd_DEV_read_latency <br />
|-<br />
|-<br />
| runstate_fullrun <br />
|-<br />
| runstate_full_contention <br />
|-<br />
| runstate_concurrency_hazard <br />
|-<br />
| runstate_blocked <br />
|-<br />
| runstate_partial_run <br />
|-<br />
| runstate_partial_contention <br />
|}<br />
<br />
== See Also ==<br />
http://community.citrix.com/display/xs/Using+[[XenServer]]+RRDs<br />
<br />
[[Category:XCP]]<br />
[[Category:Developers]]<br />
[[Category:Design Document]]</div>
94.5.117.176