##// END OF EJS Templates
processes: use better naming detection of running children processes
marcink -
r2166:5bbfeee4 default
parent child Browse files
Show More
@@ -12,7 +12,8 b''
12 12 <div class="panel-body" id="app">
13 13 <h3>List of Gunicorn processes on this machine</h3>
14 14 <%
15 def get_name(proc, cmd):
15 def get_name(proc):
16 cmd = ' '.join(proc.cmdline())
16 17 if 'vcsserver.ini' in cmd:
17 18 return 'VCSServer'
18 19 elif 'rhodecode.ini' in cmd:
@@ -23,19 +24,18 b''
23 24 % for proc in c.gunicorn_processes:
24 25 <% mem = proc.memory_info()%>
25 26 <% children = proc.children(recursive=True) %>
26 <% cmd = ' '.join(proc.cmdline()) %>
27 27 % if children:
28 28
29 29 <tr>
30 30 <td>
31 31 <code>
32 ${proc.pid} - ${get_name(proc, cmd)}
32 ${proc.pid} - ${get_name(proc)}
33 33 </code>
34 34 </td>
35 35 <td>
36 36 <a href="#showCommand" onclick="$('#pid'+${proc.pid}).toggle();return false"> command </a>
37 37 <code id="pid${proc.pid}" style="display: none">
38 ${cmd}
38 ${' '.join(proc.cmdline())}
39 39 </code>
40 40 </td>
41 41 <td></td>
@@ -55,7 +55,7 b''
55 55 <tr>
56 56 <td>
57 57 <code>
58 | ${proc_child.pid} - ${proc_child.name()}
58 | ${proc_child.pid} - ${get_name(proc_child)}
59 59 </code>
60 60 </td>
61 61 <td>
General Comments 0
You need to be logged in to leave comments. Login now