List of Gunicorn processes on this machine
<%
def get_name(proc):
cmd = ' '.join(proc.cmdline())
if 'vcsserver.ini' in cmd:
return 'VCSServer'
elif 'rhodecode.ini' in cmd:
return 'RhodeCode'
return proc.name()
%>
% for proc in c.gunicorn_processes:
<% mem = proc.memory_info()%>
<% children = proc.children(recursive=True) %>
% if children:
${proc.pid} - ${get_name(proc)}
|
command
${' '.join(proc.cmdline())}
|
|
RSS:${h.format_byte_size_binary(mem.rss)}
|
VMS:${h.format_byte_size_binary(mem.vms)}
|
AGE: ${h.age_component(h.time_to_utcdatetime(proc.create_time()))}
|
MASTER
|
<% mem_sum = 0 %>
% for proc_child in children:
<% mem = proc_child.memory_info()%>
| ${proc_child.pid} - ${get_name(proc_child)}
|
command
${' '.join(proc_child.cmdline())}
|
CPU: ${proc_child.cpu_percent()} %
|
RSS:${h.format_byte_size_binary(mem.rss)}
<% mem_sum += mem.rss %>
|
VMS:${h.format_byte_size_binary(mem.vms)}
|
AGE: ${h.age_component(h.time_to_utcdatetime(proc_child.create_time()))}
|
restart
|
% endfor
| total processes: ${len(children)} |
|
RSS:${h.format_byte_size_binary(mem_sum)} |
|
-- |
% endif
% endfor