Change load average to cpu/cores on system info.

This commit is contained in:
Josh Frye 2016-06-23 10:56:41 -04:00
parent 13ba3bd4fd
commit 0aa0ace9bc
2 changed files with 4 additions and 3 deletions

View file

@ -1,7 +1,8 @@
class Admin::SystemInfoController < Admin::ApplicationController class Admin::SystemInfoController < Admin::ApplicationController
def show def show
system_info = Vmstat.snapshot 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_used = system_info.memory.active_bytes
@mem_total = system_info.memory.total_bytes @mem_total = system_info.memory.total_bytes

View file

@ -7,9 +7,9 @@
.row .row
.col-sm-4 .col-sm-4
.light-well .light-well
%h4 CPU Load %h4 CPU
.data .data
%h1= @load %h1= "#{@cpus} cores"
.col-sm-4 .col-sm-4
.light-well .light-well
%h4 Memory %h4 Memory