This commit is contained in:
albert
2013-02-17 20:43:05 -05:00
parent c9a0a3b6c3
commit 424c9c94a8
2 changed files with 17 additions and 2 deletions

View File

@@ -5,8 +5,8 @@ module Memorylogic
def self.memory_usage
ps = Sys::ProcTable.ps(Process.pid)
if ps.respond_to?(:rss)
number_to_human_size(ps.rss.to_i * 1.kilobyte)
if ps.respond_to?(:pctmem)
ps.pctmem
else
0
end