Sha256: 5577c907158dddb7b2c78bffbce1763c2544fbdf3dd74d069dd4e33a3167fda0
Contents?: true
Size: 391 Bytes
Versions: 16
Compression:
Stored size: 391 Bytes
Contents
module ProconBypassMan class LoadAgv PATH = '/proc/loadavg' # @return [[Integer, Integer, Integer]] def get loadavg = get_proc_loadavg loadavg =~ /^([0-9.]+)\s([0-9.]+)\s([0-9.]+)/ return [$1.to_f, $2.to_f, $3.to_f].join("-") rescue Errno::ENOENT "" end private def get_proc_loadavg File.read('/proc/loadavg') end end end
Version data entries
16 entries across 16 versions & 1 rubygems