Ctop::Collectors::Net
Inherits Ctop::Collectors::Base < Reference < Object
Collects network I/O metrics with automatic rate calculation.
net = Ctop::Collectors::Net.new
loop do
sleep 1
snapshot = net.collect
puts "Down: #{(snapshot.rx_rate / 1024).round(1)} KB/s"
puts "Up: #{(snapshot.tx_rate / 1024).round(1)} KB/s"
end