Method: Informo::Memory#max_modules
- Defined in:
- lib/informo/memory.rb
#max_modules ⇒ Object
returns the maximum amount of memory slots.
20 21 22 23 24 25 26 27 |
# File 'lib/informo/memory.rb', line 20 def max_modules `dmidecode -t 5`.each_line do |line| if line =~ /Associated Memory Slots.+?(\d+)\s+/ max_modules = $1 return max_modules end end end |