lib/hawatel_ps/linux/proc_fetch.rb
def memory_total
          File.foreach('/proc/meminfo').each do |line|
            return line.split(' ')[1].to_i if line =~ /MemTotal:/
          end
        end
# Get total physical memory (RAM) size
#
# @example
#  memory_total
#
# @return [Integer]
Get total physical memory (RAM) size
Get total physical memory ( RAM ) size
def memory_total
          File.foreach('/proc/meminfo').each do |line|
            return line.split(' ')[1].to_i if line =~ /MemTotal:/
          end
        end
def memory_total File . foreach ( '/proc/meminfo' ) . each do | line | return line . split ( ' ' ) [ 1 ] . to_i if line =~ / MemTotal: / end end
Get total physical memory (RAM) size
Get total physical memory ( RAM ) size
None
Integer
example
None