Class: Tcptop::Collectd
- Inherits:
-
Object
- Object
- Tcptop::Collectd
- Defined in:
- lib/tcptop/collectd.rb
Class Method Summary collapse
Class Method Details
.reading(active, queued, hostname, label, io = STDOUT) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/tcptop/collectd.rb', line 3 def self.reading(active, queued, hostname, label, io=STDOUT) time = Time.now.to_i io.write "PUTVAL #{hostname}/#{label}/gauge-active #{time}:#{active}\n" io.write "PUTVAL #{hostname}/#{label}/gauge-queued #{time}:#{queued}\n" io.flush end |