Commit 7ea00b183cc8d258da319ef23fd967e6128dbd85
Exists in
master
and in
4 other branches
Merge branch 'sidekiq_workers_show' of /home/git/repositories/gitlab/gitlabhq
Showing
1 changed file
with
34 additions
and
0 deletions
Show diff stats
app/views/admin/background_jobs/show.html.haml
... | ... | @@ -2,3 +2,37 @@ |
2 | 2 | %br |
3 | 3 | .ui-box |
4 | 4 | %iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"} |
5 | +%h4 Sidekiq running processes | |
6 | +- sidekiq_processes = `ps -eo euser,pid,pcpu,pmem,stat,start,command | grep sidekiq | grep -v grep` | |
7 | +- if sidekiq_processes.empty? | |
8 | + %b There are no running sidekiq processes | |
9 | + %b Please restart GitLab | |
10 | +- else | |
11 | + .ui-box | |
12 | + %table.zebra-striped | |
13 | + %thead | |
14 | + %th USER | |
15 | + %th | |
16 | + %th PID | |
17 | + %th | |
18 | + %th CPU | |
19 | + %th | |
20 | + %th MEM | |
21 | + %th | |
22 | + %th STATE | |
23 | + %th | |
24 | + %th START | |
25 | + %th | |
26 | + %th COMMAND | |
27 | + %th | |
28 | + - sidekiq_processes.split("\n").each do |process| | |
29 | + - next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/) | |
30 | + - data = process.gsub!(/\s+/m, '|').strip.split('|') | |
31 | + %tr | |
32 | + - 6.times do | |
33 | + %td= data.shift | |
34 | + %td | |
35 | + %td= data.join(" ") | |
36 | + %b If '[25 of 25 busy]' is shown, restart GitLab. | |
37 | + %br | |
38 | + %b If more than one sidekiq process is listed, stop GitLab, kill the remaining sidekiq processes (sudo pkill -u git -f sidekiq) and restart GitLab. | ... | ... |