mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-25 12:36:27 +10:00
13 lines
525 B
Ruby
13 lines
525 B
Ruby
class Admin::SystemInfoController < Admin::ApplicationController
|
|
def show
|
|
system_info = Vmstat.snapshot
|
|
@load = system_info.load_average.collect { |v| v.round(2) }.join(', ')
|
|
|
|
@mem_used = Filesize.from("#{system_info.memory.active_bytes} B").to_s('GB')
|
|
@mem_total = Filesize.from("#{system_info.memory.total_bytes} B").to_s('GB')
|
|
|
|
@disk_used = Filesize.from("#{system_info.disks[0].used_bytes} B").to_s('GB')
|
|
@disk_total = Filesize.from("#{system_info.disks[0].total_bytes} B").to_s('GB')
|
|
end
|
|
end
|