<% 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: <% mem_sum = 0 %> % for proc_child in children: <% mem = proc_child.memory_info()%> % endfor % endif % endfor
${h.format_date(h.datetime.now())}
${proc.pid} - ${get_name(proc)} command 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 % if request.GET.get('dev'): | ADD | REMOVE % endif
| ${proc_child.pid} - ${get_name(proc_child)} command 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
| total processes: ${len(children)} RSS:${h.format_byte_size_binary(mem_sum)}
--