##// END OF EJS Templates
processes: use better naming detection of running processes
marcink -
r2165:e4d38834 default
parent child Browse files
Show More
@@ -11,22 +11,31 b''
11 11 </div>
12 12 <div class="panel-body" id="app">
13 13 <h3>List of Gunicorn processes on this machine</h3>
14 <%
15 def get_name(proc, cmd):
16 if 'vcsserver.ini' in cmd:
17 return 'VCSServer'
18 elif 'rhodecode.ini' in cmd:
19 return 'RhodeCode'
20 return proc.name()
21 %>
14 22 <table>
15 23 % for proc in c.gunicorn_processes:
16 24 <% mem = proc.memory_info()%>
17 25 <% children = proc.children(recursive=True) %>
26 <% cmd = ' '.join(proc.cmdline()) %>
18 27 % if children:
19 28
20 29 <tr>
21 30 <td>
22 31 <code>
23 ${proc.pid} - ${proc.name()}
32 ${proc.pid} - ${get_name(proc, cmd)}
24 33 </code>
25 34 </td>
26 35 <td>
27 36 <a href="#showCommand" onclick="$('#pid'+${proc.pid}).toggle();return false"> command </a>
28 37 <code id="pid${proc.pid}" style="display: none">
29 ${' '.join(proc.cmdline())}
38 ${cmd}
30 39 </code>
31 40 </td>
32 41 <td></td>
@@ -78,7 +87,7 b''
78 87 <td><strong>RSS:${h.format_byte_size_binary(mem_sum)}</strong></td>
79 88 <td></td>
80 89 </tr>
81 <tr><td> <code> - </code> </td></tr>
90 <tr><td> <code> -- </code> </td></tr>
82 91
83 92 % endif
84 93 % endfor
General Comments 0
You need to be logged in to leave comments. Login now