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.111 lib/epitools/sys/mem.rb
epitools-0.5.110 lib/epitools/sys/mem.rb
epitools-0.5.109 lib/epitools/sys/mem.rb
epitools-0.5.108 lib/epitools/sys/mem.rb
epitools-0.5.107 lib/epitools/sys/mem.rb