Sha256: 4a5da4067249e2794b9651c175910a83f65681556e4f06a4a1a1afe0eb6a2176

Contents?: true

Size: 416 Bytes

Versions: 5

Compression:

Stored size: 416 Bytes

Contents

module Specinfra
  class HostInventory
    class Memory
      def self.get
        cmd = Specinfra.command.get(:get_inventory_memory)
        ret = Specinfra.backend.run_command(cmd).stdout
        memory = {}
        ret.each_line do |line|
          case line
          when /^MemTotal:\s+(\d+) (.+)$/
            memory['total'] = "#{$1}#{$2}"
          end
        end
        memory
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
specinfra-2.12.0 lib/specinfra/host_inventory/memory.rb
specinfra-2.11.10 lib/specinfra/host_inventory/memory.rb
specinfra-2.11.9 lib/specinfra/host_inventory/memory.rb
specinfra-2.11.8 lib/specinfra/host_inventory/memory.rb
specinfra-2.11.7 lib/specinfra/host_inventory/memory.rb