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