summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Frye <joshfng@gmail.com>2016-06-23 10:56:41 -0400
committerJosh Frye <joshfng@gmail.com>2016-06-28 21:35:42 -0400
commit0aa0ace9bcca80af45e1060d2bfb730d3ef95836 (patch)
treeb34d96b957b3cafe62e886d8d051b0ebf6f4a76c
parent13ba3bd4fdaa59b2836efa907433d5e807ed5d5e (diff)
downloadgitlab-ce-0aa0ace9bcca80af45e1060d2bfb730d3ef95836.tar.gz
Change load average to cpu/cores on system info.
-rw-r--r--app/controllers/admin/system_info_controller.rb3
-rw-r--r--app/views/admin/system_info/show.html.haml4
2 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/admin/system_info_controller.rb b/app/controllers/admin/system_info_controller.rb
index b7333139c57..3c67370b667 100644
--- a/app/controllers/admin/system_info_controller.rb
+++ b/app/controllers/admin/system_info_controller.rb
@@ -1,7 +1,8 @@
class Admin::SystemInfoController < Admin::ApplicationController
def show
system_info = Vmstat.snapshot
- @load = system_info.load_average.collect { |v| v.round(2) }.join(', ')
+
+ @cpus = system_info.cpus.length
@mem_used = system_info.memory.active_bytes
@mem_total = system_info.memory.total_bytes
diff --git a/app/views/admin/system_info/show.html.haml b/app/views/admin/system_info/show.html.haml
index 542498cfb22..3ef2f20b589 100644
--- a/app/views/admin/system_info/show.html.haml
+++ b/app/views/admin/system_info/show.html.haml
@@ -7,9 +7,9 @@
.row
.col-sm-4
.light-well
- %h4 CPU Load
+ %h4 CPU
.data
- %h1= @load
+ %h1= "#{@cpus} cores"
.col-sm-4
.light-well
%h4 Memory