module MPatch::Extend::Process

Public Instance Methods

memory_usage() click to toggle source

return a string obj that include the memory usage info

# File lib/mpatch/process.rb, line 8
def memory_usage

  begin
    return `pmap #{self.pid}`.lines.to_a(
    ).last.chomp.scan(/ *\w* *(\w+)/)[0][0]
  rescue ::NoMethodError
    return nil
  end

end