Merge pull request #506 from rabbitmq/rabbitmq-management-499-followup
Include memory calculation strategy and details on the breakdown.
This commit is contained in:
commit
a455ac8497
|
|
@ -387,6 +387,10 @@ var HELP = {
|
|||
|
||||
'memory-use' : '<p>Note that the memory details shown here are only updated on request - they could be too expensive to calculate every few seconds on a busy server.</p><p><a target="_blank" href="http://www.rabbitmq.com/memory-use.html">Read more</a> on memory use.</p>',
|
||||
|
||||
'memory-calculation-strategy-breakdown' : '<p>The setting <code>vm_memory_calculation_strategy</code> defines which of the below memory values is used to check if the memory usage reaches the watermark or paging to disk is required.</p><p><a target="_blank" href="http://www.rabbitmq.com/memory-use.html">Read more</a> on memory use.</p>',
|
||||
|
||||
'memory-calculation-strategy' : '<p>This value can be calculated using different strategies the <code>vm_memory_calculation_strategy</code> config setting.</p><p><a target="_blank" href="http://www.rabbitmq.com/memory-use.html">Read more</a> on memory use.</p>',
|
||||
|
||||
'binary-use' : '<p>Binary accounting is not exact; binaries are shared between processes (and thus the same binary might be counted in more than one section), and the VM does not allow us to track binaries that are not associated with processes (so some binary use might not appear at all).</p>',
|
||||
|
||||
'policy-ha-mode' : 'One of <code>all</code> (mirror to all nodes in the cluster), <code>exactly</code> (mirror to a set number of nodes) or <code>nodes</code> (mirror to an explicit list of nodes). If you choose one of the latter two, you must also set <code>ha-params</code>.',
|
||||
|
|
|
|||
|
|
@ -65,8 +65,22 @@ var key = [[{name: 'Queues', colour: 'queue',
|
|||
|
||||
<div class="memory-info">
|
||||
Last updated: <b><%= fmt_date(new Date()) %></b>.<br/>
|
||||
Total memory used at last update: <b><%= fmt_bytes(memory.total) %></b>
|
||||
<span class="help" id="memory-use"></span>
|
||||
Memory calculation strategy: <b><%= memory.strategy %></b>. <span class="help" id="memory-calculation-strategy-breakdown"></span><br/><br/>
|
||||
Amount of memory used vs. allocated during last update: <span class="help" id="memory-use"></span><br/>
|
||||
<table class="facts">
|
||||
<tr>
|
||||
<th>Runtime Used</th>
|
||||
<td><%= fmt_bytes(memory.total.erlang) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Runtime Allocated</th>
|
||||
<td><%= fmt_bytes(memory.total.allocated) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Resident Set Size (RSS) reported by the OS</th>
|
||||
<td><%= fmt_bytes(memory.total.rss) %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% } %>
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Memory
|
||||
Memory <span class="help" id="memory-calculation-strategy"></span>
|
||||
</th>
|
||||
<td>
|
||||
<% if (node.mem_limit != 'memory_monitoring_disabled') { %>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
<th>Erlang processes</th>
|
||||
<% } %>
|
||||
<% if (show_column('overview', 'memory')) { %>
|
||||
<th>Memory</th>
|
||||
<th>Memory <span class="help" id="memory-calculation-strategy"></span></th>
|
||||
<% } %>
|
||||
<% if (show_column('overview', 'disk_space')) { %>
|
||||
<th>Disk space</th>
|
||||
|
|
@ -182,6 +182,7 @@
|
|||
<abbr title="Broker definitions are held in RAM. Messages will still be written to disc if necessary.">RAM</abbr>
|
||||
<% } %>
|
||||
<%= fmt_plugins_small(node) %>
|
||||
<abbr title="Memory calculation strategy"><%= fmt_string(node.mem_calculation_strategy) %></abbr>
|
||||
</td>
|
||||
<% } %>
|
||||
<% if(user_administrator && show_column('overview', 'reset_stats')) { %>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,9 @@ augment(Mode, ReqData) ->
|
|||
format(absolute, Result) ->
|
||||
Result;
|
||||
format(relative, Result) ->
|
||||
{value, {total, Total}, Rest} = lists:keytake(total, 1, Result),
|
||||
{value, {strategy, Strategy}, Rest0} = lists:keytake(strategy, 1, Result),
|
||||
{value, {total, Totals}, Rest} = lists:keytake(total, 1, Rest0),
|
||||
Total = proplists:get_value(Strategy, Totals),
|
||||
[{total, 100} | [{K, percentage(V, Total)} || {K, V} <- Rest]].
|
||||
|
||||
percentage(Part, Total) ->
|
||||
|
|
|
|||
Loading…
Reference in New Issue