Class: LogStash::Instrument::PeriodicPoller::Cgroup::CpuAcctResource

Inherits:
Object
  • Object
show all
Includes:
ControllerResource, Util::Loggable
Defined in:
lib/logstash/instrument/periodic_poller/cgroup.rb

Instance Attribute Summary

Attributes included from ControllerResource

#base_path, #offset_path, #override

Instance Method Summary collapse

Methods included from ControllerResource

#implemented?

Constructor Details

#initialize(original_path) ⇒ CpuAcctResource

Returns a new instance of CpuAcctResource.



110
111
112
# File 'lib/logstash/instrument/periodic_poller/cgroup.rb', line 110

def initialize(original_path)
  common_initialize(CPUACCT_DIR, "ls.cgroup.cpuacct.path.override", original_path)
end

Instance Method Details

#to_hashObject



113
114
115
# File 'lib/logstash/instrument/periodic_poller/cgroup.rb', line 113

def to_hash
  {:control_group => offset_path, :usage_nanos => cpuacct_usage}
end