Skip to content

Commit

Permalink
Merge branch 'master' of github.com:shun0102/fluent-plugin-stat
Browse files Browse the repository at this point in the history
  • Loading branch information
Shunsuke Mikami committed Nov 14, 2011
2 parents a02906a + fd9bbc1 commit bb7cfce
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/fluent/plugin/stat.rb
Expand Up @@ -25,17 +25,11 @@ def get_proc_info
:steal => info[8].to_i,
:guest => info[9].to_i
}
else
if info.size > 2
hash[info.first.to_sym] = info[1..-1].map{ |e| e.to_i }
else
hash[info.first.to_sym] = info[1].to_i
end
end
end
return hash
end

def get_net_info
hash = Hash.new
IO.readlines('/proc/net/dev').each do |line|
Expand Down Expand Up @@ -82,7 +76,7 @@ def get_disk_info
:wsect => info[9].to_i,
:wuse => info[10].to_i,
:running => info[11].to_i,
:use => info[12].to_i,
:use => info[12].to_i,
:aveq => info[13].to_i
}
end
Expand Down

0 comments on commit bb7cfce

Please sign in to comment.