2014-10-03 00:09:06 +08:00
|
|
|
<%
|
|
|
|
|
var width = 800;
|
|
|
|
|
if (binary == "not_available") {
|
|
|
|
|
%>
|
|
|
|
|
<p class="warning">
|
|
|
|
|
Binary statistics not available.
|
|
|
|
|
</p>
|
|
|
|
|
<% } else { %>
|
|
|
|
|
<div class="memory-bar">
|
|
|
|
|
<%
|
2014-10-06 19:12:00 +08:00
|
|
|
var sections = {'queue_procs' : ['queue', 'Queues'],
|
|
|
|
|
'queue_slave_procs' : ['queue', 'Queues (slaves)'],
|
|
|
|
|
'connection_readers' : ['conn', 'Connection readers'],
|
|
|
|
|
'connection_writers' : ['conn', 'Connection writers'],
|
|
|
|
|
'connection_channels' : ['conn', 'Connection channels'],
|
|
|
|
|
'connection_other' : ['conn', 'Connections (other)'],
|
|
|
|
|
'msg_index' : ['table', 'Message store index'],
|
|
|
|
|
'mgmt_db' : ['table', 'Management database'],
|
|
|
|
|
'plugins' : ['proc', 'Plugins'],
|
|
|
|
|
'other' : ['system', 'Other binary references']};
|
2014-10-03 00:09:06 +08:00
|
|
|
var pseudoTotal = 0
|
|
|
|
|
for (var section in sections) {
|
|
|
|
|
pseudoTotal += binary[section];
|
|
|
|
|
}
|
|
|
|
|
for (var section in sections) {
|
2014-10-06 19:12:00 +08:00
|
|
|
if (binary[section] > 0) {
|
|
|
|
|
var section_width = Math.round(width * binary[section] / pseudoTotal);
|
2014-10-03 00:09:06 +08:00
|
|
|
%>
|
2014-10-06 19:12:00 +08:00
|
|
|
<div class="memory-section memory_<%= sections[section][0] %>"
|
2014-10-03 00:09:06 +08:00
|
|
|
style="width: <%= section_width %>px;"
|
2014-10-06 19:12:00 +08:00
|
|
|
title="<%= sections[section][1] %> <%= fmt_bytes(binary[section]) %>">
|
2014-10-03 00:09:06 +08:00
|
|
|
</div>
|
2014-10-06 19:12:00 +08:00
|
|
|
<%
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
%>
|
2014-10-03 00:09:06 +08:00
|
|
|
</div>
|
|
|
|
|
<span class="clear"> </span>
|
|
|
|
|
<div class="box">
|
|
|
|
|
<table class="facts">
|
|
|
|
|
<tr>
|
2014-10-06 19:12:00 +08:00
|
|
|
<th><div class="colour-key memory_queue"></div>Queues</th>
|
2014-10-03 00:09:06 +08:00
|
|
|
<td>
|
2014-10-06 19:12:00 +08:00
|
|
|
<table class="mini">
|
|
|
|
|
<tr><td class="r"><%= fmt_bytes(binary['queue_procs']) %></td><td>queues</td></tr>
|
|
|
|
|
<tr><td class="r"><%= fmt_bytes(binary['queue_slave_procs']) %><td>slaves</td></tr>
|
|
|
|
|
</table>
|
2014-10-03 00:09:06 +08:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
2014-10-06 19:12:00 +08:00
|
|
|
</table>
|
|
|
|
|
<table class="facts">
|
2014-10-03 00:09:06 +08:00
|
|
|
<tr>
|
2014-10-06 19:12:00 +08:00
|
|
|
<th><div class="colour-key memory_conn"></div>Connections</th>
|
|
|
|
|
<td>
|
|
|
|
|
<table class="mini">
|
|
|
|
|
<tr><td class="r"><%= fmt_bytes(binary['connection_readers']) %></td><td>readers</td></tr>
|
|
|
|
|
<tr><td class="r"><%= fmt_bytes(binary['connection_writers']) %></td><td>writers</td></tr>
|
|
|
|
|
<tr><td class="r"><%= fmt_bytes(binary['connection_channels']) %></td><td>channels</td></tr>
|
|
|
|
|
<tr><td class="r"><%= fmt_bytes(binary['connection_other']) %></td><td>other</td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
2014-10-03 00:09:06 +08:00
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<table class="facts">
|
|
|
|
|
<tr>
|
2014-10-06 19:12:00 +08:00
|
|
|
<th><div class="colour-key memory_table"></div>Tables</th>
|
|
|
|
|
<td>
|
|
|
|
|
<table class="mini">
|
|
|
|
|
<tr><td class="r"><%= fmt_bytes(binary['msg_index']) %></td><td>message store index</td></tr>
|
|
|
|
|
<tr><td class="r"><%= fmt_bytes(binary['mgmt_db']) %></td><td>management database</td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
2014-10-03 00:09:06 +08:00
|
|
|
</tr>
|
2014-10-06 19:12:00 +08:00
|
|
|
</table>
|
|
|
|
|
<table class="facts">
|
2014-10-03 00:09:06 +08:00
|
|
|
<tr>
|
2014-10-06 19:12:00 +08:00
|
|
|
<th><div class="colour-key memory_proc"></div>Processes</th>
|
|
|
|
|
<td>
|
|
|
|
|
<table class="mini">
|
|
|
|
|
<tr><td class="r"><%= fmt_bytes(binary['plugins']) %></td><td>plugins</td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
2014-10-03 00:09:06 +08:00
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2014-10-06 19:12:00 +08:00
|
|
|
<th><div class="colour-key memory_system"></div>System</th>
|
|
|
|
|
<td>
|
|
|
|
|
<table class="mini">
|
|
|
|
|
<tr><td class="r"><%= fmt_bytes(binary['other']) %></td><td>other</td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
2014-10-03 00:09:06 +08:00
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="memory-info">
|
|
|
|
|
Last updated: <b><%= fmt_date(new Date()) %></b>.<br/>
|
|
|
|
|
Total referenced binaries at last update: <b><%= fmt_bytes(pseudoTotal) %></b>
|
|
|
|
|
<span class="help" id="binary-use"></span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<% } %>
|