diff --git a/plugins/thin/thin_threads b/plugins/thin/thin_threads index 16cbd567..57a4d542 100755 --- a/plugins/thin/thin_threads +++ b/plugins/thin/thin_threads @@ -44,7 +44,7 @@ module Munin instances = get_pids() instances.each do |instance| pid, port = instance.split("|") - rss = (get_threads(pid).to_i)/1024 + rss = (get_threads(pid).to_i) puts "thin_#{port}.value #{rss}" end end @@ -55,7 +55,7 @@ module Munin # TODO: make this work on OSX and Solaris, # so the whole unix gang is happy ;) def get_threads(pid) - res = `grep "Threads" /proc/#{pid}/status`.split[1] + res = `grep "Threads" /proc/#{pid}/status | cut -d ":" -f2`.gsub(/\s+/, "") if res.match("cannot access") return nil else