settings_process_management_data.mako
93 lines
| 3.1 KiB
| application/x-mako
|
MakoHtmlLexer
r2500 | ||||
<table id="procList"> | ||||
<% | ||||
def get_name(proc): | ||||
r2540 | if 'vcsserver.ini' in proc.cmd: | |||
r2500 | return 'VCSServer' | |||
r2540 | elif 'rhodecode.ini' in proc.cmd: | |||
r2500 | return 'RhodeCode' | |||
r2540 | return proc.name | |||
r2500 | %> | |||
<tr> | ||||
<td colspan="8"> | ||||
<span id="processTimeStamp">${h.format_date(h.datetime.now())}</span> | ||||
</td> | ||||
</tr> | ||||
% for proc in c.gunicorn_processes: | ||||
r2540 | % if proc.children: | |||
r2500 | <tr> | |||
<td> | ||||
<code> | ||||
${proc.pid} - ${get_name(proc)} | ||||
</code> | ||||
</td> | ||||
<td> | ||||
<a href="#showCommand" onclick="$('#pid'+${proc.pid}).toggle();return false"> command </a> | ||||
<code id="pid${proc.pid}" style="display: none"> | ||||
r2540 | ${proc.cmd} | |||
r2500 | </code> | |||
</td> | ||||
<td></td> | ||||
<td> | ||||
r2540 | RSS:${h.format_byte_size_binary(proc.mem_rss)} | |||
r2500 | </td> | |||
<td> | ||||
r2540 | VMS:${h.format_byte_size_binary(proc.mem_vms)} | |||
r2500 | </td> | |||
<td> | ||||
r2540 | AGE: ${h.age_component(h.time_to_utcdatetime(proc.create_time))} | |||
r2500 | </td> | |||
<td> | ||||
MASTER | ||||
r2503 | % if request.GET.get('dev'): | |||
| <a href="#addWorker" onclick="addWorker(${proc.pid}); return false">ADD</a> | <a href="#removeWorker" onclick="removeWorker(${proc.pid}); return false">REMOVE</a> | ||||
% endif | ||||
r2500 | </td> | |||
</tr> | ||||
<% mem_sum = 0 %> | ||||
r2540 | % for proc_child in proc.children: | |||
r3918 | % if proc_child: | |||
r2500 | <tr> | |||
<td> | ||||
<code> | ||||
| ${proc_child.pid} - ${get_name(proc_child)} | ||||
</code> | ||||
</td> | ||||
<td> | ||||
<a href="#showCommand" onclick="$('#pid'+${proc_child.pid}).toggle();return false"> command </a> | ||||
<code id="pid${proc_child.pid}" style="display: none"> | ||||
r2540 | ${proc_child.cmd} | |||
r2500 | </code> | |||
</td> | ||||
<td> | ||||
r2540 | CPU: ${proc_child.cpu_percent} % | |||
r2500 | </td> | |||
<td> | ||||
r2540 | RSS:${h.format_byte_size_binary(proc_child.mem_rss)} | |||
<% mem_sum += proc_child.mem_rss %> | ||||
r2500 | </td> | |||
<td> | ||||
r2540 | VMS:${h.format_byte_size_binary(proc_child.mem_vms)} | |||
r2500 | </td> | |||
<td> | ||||
r2540 | AGE: ${h.age_component(h.time_to_utcdatetime(proc_child.create_time))} | |||
r2500 | </td> | |||
<td> | ||||
<a href="#restartProcess" onclick="restart(this, ${proc_child.pid});return false"> | ||||
restart | ||||
</a> | ||||
</td> | ||||
</tr> | ||||
r3918 | % endif | |||
r2500 | % endfor | |||
<tr> | ||||
r2540 | <td colspan="2"><code>| total processes: ${len(proc.children)}</code></td> | |||
r2500 | <td></td> | |||
<td><strong>RSS:${h.format_byte_size_binary(mem_sum)}</strong></td> | ||||
<td></td> | ||||
</tr> | ||||
<tr><td> <code> -- </code> </td></tr> | ||||
% endif | ||||
% endfor | ||||
</table> | ||||