Sha256: 55fcce364c2991cd048fb30cd2faa2409c36eb7bc15fb5718ba6627d622ba492
Contents?: true
Size: 450 Bytes
Versions: 2
Compression:
Stored size: 450 Bytes
Contents
require 'snmp' include SNMP host = ARGV[0] || 'localhost' manager = Manager.new(:Host => host, :Port => 161) start_oid = ObjectId.new("1.3.6.1.2") next_oid = start_oid while next_oid.subtree_of?(start_oid) response = manager.get_next(next_oid) varbind = response.varbind_list.first break if varbind.value == EndOfMibView next_oid = varbind.name puts "#{varbind.name.to_s} #{varbind.value.to_s} #{varbind.value.asn1_type}" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
snmp-0.4.0 | examples/dump.rb |
snmp-0.4.1 | examples/dump.rb |