Sha256: 7db948b4b0e1c86773001c8a7bbeb7c6a0eeceb0eb5bd766e619e53fb22cd2fc
Contents?: true
Size: 475 Bytes
Versions: 26
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 = 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
26 entries across 26 versions & 1 rubygems