Sha256: 616cdf6384cc364ffc69cae897a475b4927e8a2c60edb4363b71002a5bcfa7d2

Contents?: true

Size: 312 Bytes

Versions: 9

Compression:

Stored size: 312 Bytes

Contents

require 'snmp'

host = ARGV[0] || 'localhost'

SNMP::Manager.open(:Host => "localhost") do |manager|
    manager.walk("ifTable") { |vb| puts vb }
end


SNMP::Manager.open(:Host => host) do |manager|
    manager.walk(["ifIndex", "ifDescr"]) do |ifIndex, ifDescr| 
        puts "#{ifIndex} #{ifDescr}"
    end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
snmp-1.0.3 examples/walk.rb
snmp-0.6.1 examples/walk.rb
snmp-0.4.1 examples/walk.rb
snmp-1.0.1 examples/walk.rb
snmp-0.6.0 examples/walk.rb
snmp-1.0.2 examples/walk.rb
snmp-0.5.0 examples/walk.rb
snmp-1.0.0 examples/walk.rb
snmp-0.5.1 examples/walk.rb