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
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

View File

@ -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