Sha256: 62500687cc9bd80fbf3742c5eca8a5893a8f9d363047ab9bc11e69e6a581fc72
Contents?: true
Size: 415 Bytes
Versions: 20
Compression:
Stored size: 415 Bytes
Contents
module PoolParty module Monitors class MemoryMonitor < BaseMonitor def run str = %x[free -m | grep -i mem] begin total_memory = str.split[1].to_f used_memory = str.split[2].to_f used_memory / total_memory rescue Exception => e 0.0 end end end register_monitor :memory end end
Version data entries
20 entries across 20 versions & 2 rubygems