require 'remon/helper' module Remon module Metrics class Yum include Helper def initialize(timeout: 240) @timeout = timeout end def updates_available script = File.expand_path "#{__dir__}/../scripts/yum-status" out = cmd "timeout -k 60s #{@timeout}s python #{script} 2>/dev/null", return_output: true, shell: true count = out.chomp.to_i end end end end