lib/riemann/babbler/plugins/memory.rb in riemann-babbler-0.8.5 vs lib/riemann/babbler/plugins/memory.rb in riemann-babbler-0.8.6

- old
+ new

@@ -16,10 +16,10 @@ free_bc = free + buffers + cached fraction = 1 - (free_bc.to_f / total) swap_fraction = m['SwapTotal'] == 0 ? 0 : 1 - m['SwapFree'].to_f/m['SwapTotal'] - desc = "usage\n\n#{shell('ps -eo pcpu,pid,cmd --sort -pmem | head -10').chomp}" + desc = "#{shell('ps -eo pmem,pid,cmd --sort -pmem | head -10').chomp}" [ { :service => plugin.service + " % free", :description => "Memory usage, %", :metric => fraction.round(2) * 100 }, { :service => plugin.service + " % swap", :description => "Swap usage, %", :metric => swap_fraction.round(2) * 100 }, { :service => plugin.service + " abs free", :description => "Memory free (kB)\n\n #{desc}", :metric => free, :state => 'ok' },