Class: SadfInput
- Inherits:
-
Fluent::Input
- Object
- Fluent::Input
- SadfInput
- Defined in:
- lib/fluent/plugin/in_sadf.rb
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/fluent/plugin/in_sadf.rb', line 12 def configure(conf) super @interval_m = @sar_option.split.size.zero? ? @interval * 60 : @interval * 60 - 1 begin `sar -V` rescue raise Fluent::ConfigError, "sar(sysstat) is not installed." end end |
#shutdown ⇒ Object
27 28 29 |
# File 'lib/fluent/plugin/in_sadf.rb', line 27 def shutdown @thread.kill end |
#start ⇒ Object
22 23 24 25 |
# File 'lib/fluent/plugin/in_sadf.rb', line 22 def start super @thread = Thread.new(&method(:run)) end |