Sha256: f42b119e848792a5595b7b5296ec3fc08b3112a190606805aea3494a3663009e
Contents?: true
Size: 402 Bytes
Versions: 11
Compression:
Stored size: 402 Bytes
Contents
# -*- encoding: utf-8 -*- module Bluepill module ProcessConditions class CpuUsage < ProcessCondition def initialize(options = {}) @below = options[:below] end def run(pid, include_children) # third col in the ps axu output System.cpu_usage(pid, include_children).to_f end def check(value) value < @below end end end end
Version data entries
11 entries across 11 versions & 2 rubygems