##// END OF EJS Templates
processes: handle exiting processes in display.
marcink -
r3918:d77a18af default
parent child Browse files
Show More
@@ -1,91 +1,93 b''
1 1
2 2 <table id="procList">
3 3 <%
4 4 def get_name(proc):
5 5 if 'vcsserver.ini' in proc.cmd:
6 6 return 'VCSServer'
7 7 elif 'rhodecode.ini' in proc.cmd:
8 8 return 'RhodeCode'
9 9 return proc.name
10 10 %>
11 11 <tr>
12 12 <td colspan="8">
13 13 <span id="processTimeStamp">${h.format_date(h.datetime.now())}</span>
14 14 </td>
15 15 </tr>
16 16 % for proc in c.gunicorn_processes:
17 17
18 18 % if proc.children:
19 19 <tr>
20 20 <td>
21 21 <code>
22 22 ${proc.pid} - ${get_name(proc)}
23 23 </code>
24 24 </td>
25 25 <td>
26 26 <a href="#showCommand" onclick="$('#pid'+${proc.pid}).toggle();return false"> command </a>
27 27 <code id="pid${proc.pid}" style="display: none">
28 28 ${proc.cmd}
29 29 </code>
30 30 </td>
31 31 <td></td>
32 32 <td>
33 33 RSS:${h.format_byte_size_binary(proc.mem_rss)}
34 34 </td>
35 35 <td>
36 36 VMS:${h.format_byte_size_binary(proc.mem_vms)}
37 37 </td>
38 38 <td>
39 39 AGE: ${h.age_component(h.time_to_utcdatetime(proc.create_time))}
40 40 </td>
41 41 <td>
42 42 MASTER
43 43 % if request.GET.get('dev'):
44 44 | <a href="#addWorker" onclick="addWorker(${proc.pid}); return false">ADD</a> | <a href="#removeWorker" onclick="removeWorker(${proc.pid}); return false">REMOVE</a>
45 45 % endif
46 46 </td>
47 47 </tr>
48 48 <% mem_sum = 0 %>
49 49 % for proc_child in proc.children:
50 % if proc_child:
50 51 <tr>
51 52 <td>
52 53 <code>
53 54 | ${proc_child.pid} - ${get_name(proc_child)}
54 55 </code>
55 56 </td>
56 57 <td>
57 58 <a href="#showCommand" onclick="$('#pid'+${proc_child.pid}).toggle();return false"> command </a>
58 59 <code id="pid${proc_child.pid}" style="display: none">
59 60 ${proc_child.cmd}
60 61 </code>
61 62 </td>
62 63 <td>
63 64 CPU: ${proc_child.cpu_percent} %
64 65 </td>
65 66 <td>
66 67 RSS:${h.format_byte_size_binary(proc_child.mem_rss)}
67 68 <% mem_sum += proc_child.mem_rss %>
68 69 </td>
69 70 <td>
70 71 VMS:${h.format_byte_size_binary(proc_child.mem_vms)}
71 72 </td>
72 73 <td>
73 74 AGE: ${h.age_component(h.time_to_utcdatetime(proc_child.create_time))}
74 75 </td>
75 76 <td>
76 77 <a href="#restartProcess" onclick="restart(this, ${proc_child.pid});return false">
77 78 restart
78 79 </a>
79 80 </td>
80 81 </tr>
82 % endif
81 83 % endfor
82 84 <tr>
83 85 <td colspan="2"><code>| total processes: ${len(proc.children)}</code></td>
84 86 <td></td>
85 87 <td><strong>RSS:${h.format_byte_size_binary(mem_sum)}</strong></td>
86 88 <td></td>
87 89 </tr>
88 90 <tr><td> <code> -- </code> </td></tr>
89 91 % endif
90 92 % endfor
91 93 </table>
General Comments 0
You need to be logged in to leave comments. Login now