Change load average to cpu/cores on system info.
This commit is contained in:
parent
13ba3bd4fd
commit
0aa0ace9bc
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue