File: memory.ejs

package info (click to toggle)
rabbitmq-server 3.3.5-1.1
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 12,004 kB
  • sloc: erlang: 78,203; python: 3,187; xml: 2,843; makefile: 903; sh: 831; java: 660; perl: 64; ruby: 63
file content (96 lines) | stat: -rw-r--r-- 2,592 bytes parent folder | download | duplicates (2)
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
<%
  var width = 800;
  if (memory == "not_available") {
%>
<p class="warning">
  Memory statistics not available.
</p>
<% } else { %>
<div class="memory-bar">
<%
  var sections = {'connection_procs' : 'Connections',
                  'queue_procs'      : 'Queues',
                  'plugins'          : 'Plugins',
                  'other_proc'       : 'Other process memory',
                  'mnesia'           : 'Mnesia',
                  'msg_index'        : 'Message store index',
                  'mgmt_db'          : 'Management database',
                  'other_ets'        : 'Other ETS tables',
                  'binary'           : 'Binaries',
                  'code'             : 'Code',
                  'atom'             : 'Atoms',
                  'other_system'     : 'Other system'};
  for (var section in sections) {
    var section_width = Math.round(width * memory[section] / memory.total);
%>
  <div class="memory-section memory_<%= section %>"
       style="width: <%= section_width %>px;"
       title="<%= sections[section] %> <%= fmt_bytes(memory[section]) %>">
  </div>
<% } %>
</div>
<span class="clear">&nbsp;</span>
<div class="box">
<table class="facts">
  <tr>
    <th>Connections</th>
    <td><%= fmt_memory(memory, 'connection_procs') %></td>
  </tr>
  <tr>
    <th>Queues</th>
    <td><%= fmt_memory(memory, 'queue_procs') %></td>
  </tr>
  <tr>
    <th>Plugins</th>
    <td><%= fmt_memory(memory, 'plugins') %></td>
  </tr>
  <tr>
    <th>Other process memory</th>
    <td><%= fmt_memory(memory, 'other_proc') %></td>
  </tr>
</table>
<table class="facts">
  <tr>
    <th>Mnesia</th>
    <td><%= fmt_memory(memory, 'mnesia') %></td>
  </tr>
  <tr>
    <th>Message store index</th>
    <td><%= fmt_memory(memory, 'msg_index') %></td>
  </tr>
  <tr>
    <th>Management database</th>
    <td><%= fmt_memory(memory, 'mgmt_db') %></td>
  </tr>
  <tr>
    <th>Other ETS tables</th>
    <td><%= fmt_memory(memory, 'other_ets') %></td>
  </tr>
</table>
<table class="facts">
  <tr>
    <th>Binaries</th>
    <td><%= fmt_memory(memory, 'binary') %></td>
  </tr>
  <tr>
    <th>Code</th>
    <td><%= fmt_memory(memory, 'code') %></td>
  </tr>
  <tr>
    <th>Atoms</th>
    <td><%= fmt_memory(memory, 'atom') %></td>
  </tr>
  <tr>
    <th>Other system</th>
    <td><%= fmt_memory(memory, 'other_system') %></td>
  </tr>
</table>
</div>

<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>
</div>

<% } %>