class Total::FreeBSD
FreeBSD
specifics.
Public Instance Methods
memory()
click to toggle source
Get the total in bytes
# File lib/total/freebsd.rb, line 34 def memory begin `sysctl -a`.split("\n").each do |t| return t.split(' ')[1].to_i if t.start_with?('hw.physmem:') end rescue Errno::ENOENT => e raise CantDetect, e.message end raise CantDetect, 'Can\'t detect memory size via sysctl' end