Sha256: 51dcc79bd54a2a61b56066a4823cdbdab898ea36e9daf6b4e12b4be812e877b8

Contents?: true

Size: 1.19 KB

Versions: 25

Compression:

Stored size: 1.19 KB

Contents

module Sys

  #-----------------------------------------------------------------------------

  cross_platform_method :memstat

  def self.memstat_linux
    #$ free
    #             total       used       free     shared    buffers     cached
    #Mem:       4124380    3388548     735832          0     561888     968004
    #-/+ buffers/cache:    1858656    2265724
    #Swap:      2104504     166724    1937780

    #$ vmstat
    raise "Not implemented"
  end

  def self.memstat_darwin
    #$ vm_stat
    #Mach Virtual Memory Statistics: (page size of 4096 bytes)
    #Pages free:                         198367.
    #Pages active:                       109319.
    #Pages inactive:                      61946.
    #Pages speculative:                   18674.
    #Pages wired down:                    70207.
    #"Translation faults":            158788687.
    #Pages copy-on-write:              17206973.
    #Pages zero filled:                54584525.
    #Pages reactivated:                    8768.
    #Pageins:                            176076.
    #Pageouts:                             3757.
    #Object cache: 16 hits of 255782 lookups (0% hit rate)

    #$ iostat
    raise "Not implemented"
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
epitools-0.5.136 lib/epitools/sys/mem.rb
epitools-0.5.134 lib/epitools/sys/mem.rb
epitools-0.5.133 lib/epitools/sys/mem.rb
epitools-0.5.131 lib/epitools/sys/mem.rb
epitools-0.5.130 lib/epitools/sys/mem.rb
epitools-0.5.129 lib/epitools/sys/mem.rb
epitools-0.5.128 lib/epitools/sys/mem.rb
epitools-0.5.126 lib/epitools/sys/mem.rb
epitools-0.5.125 lib/epitools/sys/mem.rb
epitools-0.5.124 lib/epitools/sys/mem.rb
epitools-0.5.123 lib/epitools/sys/mem.rb
epitools-0.5.122 lib/epitools/sys/mem.rb
epitools-0.5.121 lib/epitools/sys/mem.rb
epitools-0.5.119 lib/epitools/sys/mem.rb
epitools-0.5.118 lib/epitools/sys/mem.rb
epitools-0.5.116 lib/epitools/sys/mem.rb
epitools-0.5.115 lib/epitools/sys/mem.rb
epitools-0.5.114 lib/epitools/sys/mem.rb
epitools-0.5.113 lib/epitools/sys/mem.rb
epitools-0.5.112 lib/epitools/sys/mem.rb