From: Kyle Schmitt Date: 2010-01-21T00:30:59+09:00 Subject: Re: Working with SNMP > I've not used the ruby snmp library yet. But I have been using ruby to > drive NetSNMP. > It's a good tool to use to make sure the agent that you're trying to > communicate with > is working properly. Also using wireshark to see what going on is also > useful - it allows > you to load your device specific mibs. > > > regards, > Darryl Darryl, isn't driving NetSNMP's cli client from ruby a little cumbersome? Or are you using the libs directly through ffi? For simple snmp stuff I've been using the s2nmp library. http://members.at.infoseek.co.jp/m6809/ It's pretty straight forward, like this little snippet (this just gets the status of the consumables on a printer). #!/usr/bin/ruby require 'socket' require 's2nmp' printer=SNMP.new("lj2") printer.get("public",["1.3.6.1.2.1.43.11.1.1.9.1.1"]) puts printer.vars