Cpu Memory Stats

Simple gem for getting information about cpu and memory usage

Currently only for Mac OS X & BSD

Usage

puts CpuMemoryStats.get
# {
#   :cpu=>{
#     :user=>56.25,
#     :system=>43.75,
#     :idle=>0.0,
#     :nice=>0,
#     :interupt=>0
#   },
#   :memory=>{
#     :wired=>1147142144,
#     :active=>2091909120,
#     :inactive=>1045430272,
#     :used=>4283432960,
#     :free=>10145792
#   },
#   :load=>[3.03, 3.17, 3.13],
#   :cpu_percent=>{
#     :user=>56.25,
#     :system=>43.75,
#     :idle=>0.0,
#     :nice=>0.0,
#     :interupt=>0.0
#   },
#   :memory_percent=>{
#     :wired=>13.37,
#     :active=>24.39,
#     :inactive=>12.19,
#     :used=>49.93,
#     :free=>0.12
#   }
# }

Contributing to cpu-memory-stats

Copyright © 2012 Ondrej Bartas. See LICENSE.txt for further details.