Sha256: f91408dd21d2c7278cdc8d4a1e8ea78bf4e8a3d88ff376b7b87c09eaf41645ff

Contents?: true

Size: 388 Bytes

Versions: 11

Compression:

Stored size: 388 Bytes

Contents

module MPatch

  module Extend

    module Process

      # return a string obj that include the memory usage info
      def memory_usage

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

      end

    end

  end

  require File.join 'mpatch','injector'


end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mpatch-2.12.2 lib/mpatch/process.rb
mpatch-2.12.1 lib/mpatch/process.rb
mpatch-2.12.0 lib/mpatch/process.rb
mpatch-2.11.0 lib/mpatch/process.rb
mpatch-2.9.0 lib/mpatch/process.rb
mpatch-2.8.1 lib/mpatch/process.rb
mpatch-2.8.0 lib/mpatch/process.rb
mpatch-2.7.0 lib/mpatch/process.rb
mpatch-2.6.0 lib/mpatch/process.rb
mpatch-2.5.0 lib/mpatch/process.rb
mpatch-2.4.0 lib/mpatch/process.rb