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