Class: Vmstat::LinuxMemory

Inherits:
Memory
  • Object
show all
Defined in:
lib/vmstat/memory.rb,
lib/vmstat/linux_memory.rb

Instance Attribute Summary collapse

Attributes inherited from Memory

#active, #free, #inactive, #pageins, #pageouts, #pagesize, #wired

Instance Method Summary collapse

Methods inherited from Memory

#active_bytes, #free_bytes, #inactive_bytes, #total_bytes, #wired_bytes

Instance Attribute Details

#availableFixnum

Returns:

  • (Fixnum)

    the current value of available



53
54
55
# File 'lib/vmstat/memory.rb', line 53

def available
  @available
end

Instance Method Details

#available_bytesFixnum

Calculate the available bytes based of the active pages.

Returns:

  • (Fixnum)

    active bytes



58
59
60
# File 'lib/vmstat/memory.rb', line 58

def available_bytes
  available * pagesize
end