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