lib/riemann/babbler/plugins/cpu.rb in riemann-babbler-0.3.1 vs lib/riemann/babbler/plugins/cpu.rb in riemann-babbler-0.3.3

- old
+ new

@@ -1,6 +1,5 @@ -class Riemann::Babbler::Cpu - include Riemann::Babbler +class Riemann::Babbler::Cpu < Riemann::Babbler def collect cpu = File.read('/proc/stat') cpu[/cpu\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/] u2, n2, s2, i2 = [$1, $2, $3, $4].map { |e| e.to_i }