class Specinfra::Command::Linux::Base::Inventory

Public Class Methods

get_block_device() click to toggle source
# File lib/specinfra/command/linux/base/inventory.rb, line 31
def get_block_device
  block_device_dirs = '/sys/block/*/{size,removable,device/{model,rev,state,timeout,vendor},queue/rotational}'
  "for f in $(ls #{block_device_dirs}); do echo -e \"${f}\t$(cat ${f})\"; done"
end
get_cpu() click to toggle source
# File lib/specinfra/command/linux/base/inventory.rb, line 7
def get_cpu
  'cat /proc/cpuinfo'
end
get_domain() click to toggle source
# File lib/specinfra/command/linux/base/inventory.rb, line 15
def get_domain
  'dnsdomainname'
end
get_filesystem() click to toggle source
# File lib/specinfra/command/linux/base/inventory.rb, line 23
def get_filesystem
  'df -P'
end
get_fqdn() click to toggle source
# File lib/specinfra/command/linux/base/inventory.rb, line 19
def get_fqdn
  'hostname -f'
end
get_hostname() click to toggle source
# File lib/specinfra/command/linux/base/inventory.rb, line 11
def get_hostname
  'hostname -s'
end
get_kernel() click to toggle source
# File lib/specinfra/command/linux/base/inventory.rb, line 27
def get_kernel
  'uname -s -r'
end
get_memory() click to toggle source
# File lib/specinfra/command/linux/base/inventory.rb, line 3
def get_memory
  'cat /proc/meminfo'
end
get_mount() click to toggle source
# File lib/specinfra/command/linux/base/inventory.rb, line 40
def get_mount
  'cat /proc/mounts'
end
get_system_product_name() click to toggle source
# File lib/specinfra/command/linux/base/inventory.rb, line 36
def get_system_product_name
  "dmidecode -s system-product-name"
end