fluent-plugin-jstat 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-jstat"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
8
8
  spec.authors = ["wukawa"]
9
9
  spec.email = ["wataru.yukawa@nhn.com"]
10
10
  spec.summary = %q{jstat input plugin for Fluent event collector}
@@ -30,8 +30,6 @@ module Fluent
30
30
 
31
31
  def configure(conf)
32
32
  super
33
- @pid = File.read(@pid_path)
34
- @command = "#{@jstat_path} #{@option} #{@pid}"
35
33
  end
36
34
 
37
35
  def start
@@ -55,8 +53,10 @@ module Fluent
55
53
  end
56
54
 
57
55
  def on_timer
56
+ pid = File.read(@pid_path)
57
+ command = "#{@jstat_path} #{@option} #{pid}"
58
58
  now = Engine.now
59
- io = IO.popen(@command, "r")
59
+ io = IO.popen(command, "r")
60
60
  lines = io.readlines()
61
61
  headers = lines[0].split()
62
62
  datas = lines[1].split()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-jstat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-17 00:00:00.000000000 Z
12
+ date: 2014-03-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler