summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-10-15 17:19:18 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-10-15 17:19:18 +0000
commit7ea00b183cc8d258da319ef23fd967e6128dbd85 (patch)
tree3800cc54492c7702d3e4de92770c93c636b91276
parent17df09b79ee10ef9c1fdeb8593337745768ef6f9 (diff)
parenta271570ea9e0e53cf5574a1060d97a55145b583e (diff)
downloadgitlab-ce-7ea00b183cc8d258da319ef23fd967e6128dbd85.tar.gz
Merge branch 'sidekiq_workers_show' of /home/git/repositories/gitlab/gitlabhq
-rw-r--r--app/views/admin/background_jobs/show.html.haml34
1 files changed, 34 insertions, 0 deletions
diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml
index 2d4ffc10d5f..6bdf2c3cda8 100644
--- a/app/views/admin/background_jobs/show.html.haml
+++ b/app/views/admin/background_jobs/show.html.haml
@@ -2,3 +2,37 @@
%br
.ui-box
%iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"}
+%h4 Sidekiq running processes
+- sidekiq_processes = `ps -eo euser,pid,pcpu,pmem,stat,start,command | grep sidekiq | grep -v grep`
+- if sidekiq_processes.empty?
+ %b There are no running sidekiq processes
+ %b Please restart GitLab
+- else
+ .ui-box
+ %table.zebra-striped
+ %thead
+ %th USER
+ %th
+ %th PID
+ %th
+ %th CPU
+ %th
+ %th MEM
+ %th
+ %th STATE
+ %th
+ %th START
+ %th
+ %th COMMAND
+ %th
+ - sidekiq_processes.split("\n").each do |process|
+ - next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/)
+ - data = process.gsub!(/\s+/m, '|').strip.split('|')
+ %tr
+ - 6.times do
+ %td= data.shift
+ %td
+ %td= data.join(" ")
+ %b If '[25 of 25 busy]' is shown, restart GitLab.
+ %br
+ %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.