Sha256: 9fff9195aa871d285c372ce89e85789f4d1ef4f96409ff0e591da29031817f92
Contents?: true
Size: 482 Bytes
Versions: 4
Compression:
Stored size: 482 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
4 entries across 4 versions & 1 rubygems