Sha256: 1bdbc0dca4f29e20f024172b098e891d13558efbd31138e3ff17e4a4d9e6005a

Contents?: true

Size: 361 Bytes

Versions: 1

Compression:

Stored size: 361 Bytes

Contents

require 'eventmachine'
require 'collectd'

EM.run do
  Collectd::use_eventmachine = true
  Collectd::add_server 1

  c = 0
  EM.add_periodic_timer(0.01) do
    Collectd.ruby_collectd(:test).ping(:fun).gauge = 42 + Math.sin(Time.now.to_f / 600) * 23.5
    Collectd.ruby_collectd(:test).cpu(:time).counter = c

    c += 1
    print '.'
    STDOUT.flush
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
astro-collectd-0.0.8 examples/em_sender.rb