Class: Vmstator::MacOSPages

Inherits:
Stats
  • Object
show all
Defined in:
lib/vmstator/macos/pages.rb

Instance Attribute Summary collapse

Attributes inherited from Stats

#data

Instance Method Summary collapse

Methods inherited from Stats

#initialize

Constructor Details

This class inherits a constructor from Vmstator::Stats

Instance Attribute Details

#activeObject (readonly)

total number of pages currently in use and pageable



5
6
7
# File 'lib/vmstator/macos/pages.rb', line 5

def active
  @active
end

#anonymousObject (readonly)

total number of pages that are anonymous



17
18
19
# File 'lib/vmstator/macos/pages.rb', line 17

def anonymous
  @anonymous
end

#compressionsObject (readonly)

total number of pages that have been compressed by the VM compressor



21
22
23
# File 'lib/vmstator/macos/pages.rb', line 21

def compressions
  @compressions
end

#copy_on_writeObject (readonly)

number of faults that caused a page to be copied (generally caused by copy-on-write faults)



12
13
14
# File 'lib/vmstator/macos/pages.rb', line 12

def copy_on_write
  @copy_on_write
end

#decompressionsObject (readonly)

total number of pages that have been decompressed by the VM compressor



20
21
22
# File 'lib/vmstator/macos/pages.rb', line 20

def decompressions
  @decompressions
end

#file_backedObject (readonly)

total number of pages that are file-backed (non-swap)



16
17
18
# File 'lib/vmstator/macos/pages.rb', line 16

def file_backed
  @file_backed
end

#freeObject (readonly)

total number of free pages in the system



4
5
6
# File 'lib/vmstator/macos/pages.rb', line 4

def free
  @free
end

#inactiveObject (readonly)

total number of pages on the inactive list



6
7
8
# File 'lib/vmstator/macos/pages.rb', line 6

def inactive
  @inactive
end

#insObject (readonly)

total number of requests for pages from a pager (such as the inode pager)



22
23
24
# File 'lib/vmstator/macos/pages.rb', line 22

def ins
  @ins
end

#occupied_by_compressorObject (readonly)

number of pages used to store compressed VM pages



19
20
21
# File 'lib/vmstator/macos/pages.rb', line 19

def occupied_by_compressor
  @occupied_by_compressor
end

#outsObject (readonly)

total number of pages that have been paged out



23
24
25
# File 'lib/vmstator/macos/pages.rb', line 23

def outs
  @outs
end

#purgeableObject (readonly)

total number of purgeable pages



10
11
12
# File 'lib/vmstator/macos/pages.rb', line 10

def purgeable
  @purgeable
end

#purgedObject (readonly)

total number of pages that have been purged



15
16
17
# File 'lib/vmstator/macos/pages.rb', line 15

def purged
  @purged
end

#reactivatedObject (readonly)

total number of pages that have been moved from the inactive list to the active list (reactivated)



14
15
16
# File 'lib/vmstator/macos/pages.rb', line 14

def reactivated
  @reactivated
end

#speculativeObject (readonly)

total number of pages on the speculative list



7
8
9
# File 'lib/vmstator/macos/pages.rb', line 7

def speculative
  @speculative
end

#stored_in_compressorObject (readonly)

total number of pages (uncompressed) held within the compressor



18
19
20
# File 'lib/vmstator/macos/pages.rb', line 18

def stored_in_compressor
  @stored_in_compressor
end

#swapinsObject (readonly)

total number of compressed pages that have been swapped out to disk



24
25
26
# File 'lib/vmstator/macos/pages.rb', line 24

def swapins
  @swapins
end

#swapoutsObject (readonly)

total number of compressed pages that have been swapped back in from disk



25
26
27
# File 'lib/vmstator/macos/pages.rb', line 25

def swapouts
  @swapouts
end

#throttledObject (readonly)

total number of pages on the throttled list (not wired but not pageable)



8
9
10
# File 'lib/vmstator/macos/pages.rb', line 8

def throttled
  @throttled
end

#translation_faultsObject (readonly)

number of times the “vm_fault” routine has been called



11
12
13
# File 'lib/vmstator/macos/pages.rb', line 11

def translation_faults
  @translation_faults
end

#wired_downObject (readonly)

total number of pages wired down. that is, pages that cannot be paged out



9
10
11
# File 'lib/vmstator/macos/pages.rb', line 9

def wired_down
  @wired_down
end

#zero_filledObject (readonly)

total number of pages that have been zero-filled on demand



13
14
15
# File 'lib/vmstator/macos/pages.rb', line 13

def zero_filled
  @zero_filled
end

Instance Method Details

#update(data) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/vmstator/macos/pages.rb', line 27

def update(data)
  if data
    @free                   =  data[:pages_free]                   
    @active                 =  data[:pages_active]                
    @inactive               =  data[:pages_inactive]              
    @speculative            =  data[:pages_speculative]           
    @throttled              =  data[:pages_throttled]          
    @wired_down             =  data[:pages_wired_down]            
    @purgeable              =  data[:pages_purgeable]           
    @translation_faults     =  data[:translation_faults]          
    @copy_on_write          =  data[:pages_copy_on_write]         
    @zero_filled            =  data[:pages_zero_filled]        
    @reactivated            =  data[:pages_reactivated]          
    @purged                 =  data[:pages_purged]          
    @file_backed            =  data[:file_backed_pages]           
    @anonymous              =  data[:anonymous_pages]          
    @stored_in_compressor   =  data[:pages_stored_in_compressor] 
    @occupied_by_compressor =  data[:pages_occupied_by_compressor]
    @decompressions         =  data[:decompressions]
    @compressions           =  data[:compressions]             
    @ins                    =  data[:pageins]               
    @outs                   =  data[:pageouts]                    
    @swapins                =  data[:swapins]                   
    @swapouts               =  data[:swapouts]                    
  else
    return false
  end
  true
end