Sha256: efd5273dec9f54851c1e78cabc12890ee0b4fad5a2409fea41b6aa43b85cb14f
Contents?: true
Size: 475 Bytes
Versions: 6
Compression:
Stored size: 475 Bytes
Contents
module Serverspec module Type class Cgroup < Base attr_accessor :subsystem def method_missing(meth) if @subsystem.nil? @subsystem = meth.to_s self else param = "#{@subsystem}.#{meth.to_s}" ret = @runner.run_command("cgget -n -r #{param} #{@name} | awk '{print $2}'") val = ret.stdout.strip val = val.to_i if val.match(/^\d+$/) val end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems