Sha256: c8bbee8272ad93947015fb8c213e8b1f63ccad5e200faf0150223c1995f753ad
Contents?: true
Size: 484 Bytes
Versions: 29
Compression:
Stored size: 484 Bytes
Contents
module Serverspec module Type class Cgroup < Base attr_accessor :subsystem def method_missing(meth) if @subsystem.nil? @subsystem = meth.to_s return self else param = "#{@subsystem}.#{meth.to_s}" ret = backend.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
29 entries across 29 versions & 1 rubygems