class Vmstat::Memory
Gathered memory data snapshot. @attr [Fixnum] pagesize
The page size of the memory in bytes.
@attr [Fixnum] wired
The number of wired pages in the system.
@attr [Fixnum] active
The number of active pages in the system.
@attr [Fixnum] inactive
The number of inactive pages in the system.
@attr [Fixnum] free
The number of free pages in the system.
@attr [Fixnum] pageins
The number of pageins.
@attr [Fixnum] pageouts
The number of pageouts.
Public Instance Methods
active_bytes()
click to toggle source
Calculate the active bytes based of the active pages. @return [Fixnum] active bytes
# File lib/vmstat/memory.rb, line 27 def active_bytes active * pagesize end
free_bytes()
click to toggle source
Calculate the free bytes based of the free pages. @return [Fixnum] free bytes
# File lib/vmstat/memory.rb, line 39 def free_bytes free * pagesize end
inactive_bytes()
click to toggle source
Calculate the inactive bytes based of the inactive pages. @return [Fixnum] inactive bytes
# File lib/vmstat/memory.rb, line 33 def inactive_bytes inactive * pagesize end
total_bytes()
click to toggle source
Calculate the total bytes based of all pages @return [Fixnum] total bytes
# File lib/vmstat/memory.rb, line 45 def total_bytes (wired + active + inactive + free) * pagesize end
wired_bytes()
click to toggle source
@return [Fixnum] wired bytes
# File lib/vmstat/memory.rb, line 21 def wired_bytes wired * pagesize end