mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Ruby plugins: apply style changes as suggested by "rubocop --fix-layout"
This commit is contained in:
parent
26c29daa2b
commit
b0b39b018e
30 changed files with 1447 additions and 1384 deletions
|
@ -32,7 +32,8 @@ module Munin
|
|||
chunks = line.strip.split(/\s+/, 5)
|
||||
pid, pcmd = chunks[0], chunks[4]
|
||||
next if pid !~ /\A\d+\z/ or pcmd !~ /worker/
|
||||
result << pid.to_i
|
||||
|
||||
result << pid.to_i
|
||||
end
|
||||
result
|
||||
end
|
||||
|
@ -48,7 +49,7 @@ module Munin
|
|||
end
|
||||
|
||||
def memory_usage
|
||||
result = { :master => {master_pid => nil}, :worker => {} }
|
||||
result = { :master => { master_pid => nil }, :worker => {} }
|
||||
ps_output = `ps auxw | grep unicorn`
|
||||
ps_output.split("\n").each do |line|
|
||||
chunks = line.strip.split(/\s+/, 11)
|
||||
|
|
|
@ -32,7 +32,8 @@ module Munin
|
|||
chunks = line.strip.split(/\s+/, 5)
|
||||
pid, pcmd = chunks[0], chunks[4]
|
||||
next if pid !~ /\A\d+\z/ or pcmd !~ /worker/
|
||||
result << pid.to_i
|
||||
|
||||
result << pid.to_i
|
||||
end
|
||||
result
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue