Module: MPatch::Extend::Process

Defined in:
lib/mpatch/process.rb

Instance Method Summary collapse

Instance Method Details

#memory_usageObject

return a string obj that include the memory usage info



8
9
10
11
12
13
14
15
16
17
# 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