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