Class: Fluent::TopInputParser
- Inherits:
-
Object
- Object
- Fluent::TopInputParser
- Defined in:
- lib/fluent/plugin/in_top_parser.rb
Constant Summary collapse
- STATE_HEADER =
state
1- STATE_PROCESS =
2- @@PS_INFO =
Struct.new(:pid, :user, :res, :cpu, :mem, :cmd, :args)
Instance Method Summary collapse
-
#initialize ⇒ TopInputParser
constructor
A new instance of TopInputParser.
- #parse(line) ⇒ Object
Constructor Details
#initialize ⇒ TopInputParser
Returns a new instance of TopInputParser.
9 10 11 |
# File 'lib/fluent/plugin/in_top_parser.rb', line 9 def initialize() reset_state end |
Instance Method Details
#parse(line) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/fluent/plugin/in_top_parser.rb', line 13 def parse(line) case @state when STATE_HEADER then return parse_header line else return parse_process line end end |