typo
This commit is contained in:
parent
8f1d04b1cf
commit
f84da71819
1 changed files with 3 additions and 3 deletions
|
@ -1,12 +1,12 @@
|
|||
dir = Path[ENV.fetch("PSI_DIR", "/proc/pressure")]
|
||||
time = Time.utc.to_s("%s%9N")
|
||||
|
||||
Dir.children(dir).each do |ressource|
|
||||
File.read_lines(dir/ressource).each do |line|
|
||||
Dir.children(dir).each do |resource|
|
||||
File.read_lines(dir/resource).each do |line|
|
||||
parts = line.split
|
||||
type = parts[0]
|
||||
metrics = parts[1..-1].map{ |part| part.split('=') }.to_h
|
||||
puts %(pressure_stall,ressource=#{ressource},type=#{type} avg10=#{metrics["avg10"]},avg60=#{metrics["avg60"]},avg300=#{metrics["avg300"]},total=#{metrics["total"]} #{time})
|
||||
puts %(pressure_stall,resource=#{resource},type=#{type} avg10=#{metrics["avg10"]},avg60=#{metrics["avg60"]},avg300=#{metrics["avg300"]},total=#{metrics["total"]} #{time})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue