You need the snmptools package in your distribution (may be part of the
net-snmp package, depending on your distribution).
Once you install that, you have a program called 'snmpget'. This will retrieve
the value of a MIB variable to stdout.
You want to retrieve the .vendorID and .deviceType fields from the standard
system MIB (you can look those up either in the MIBs for your printers, or in
the SNMP RFCs).
You then need something like the following pseudo-code (no carping about
backticks or csh syntax, please. I've heard it, and so has everyone else):
touch output.file
foreach i in (`cat ipadresslist.file`)
snmpget $i system.vendorID >> output.file
snmpget $i system.deviceType >> output.file
end
The syntax of the above is off the top of my head, so check the man pages, but
hand something like this a file of IP addresses or host names to try, and the
output file should contain the responses you want. If you replace the snmpget
program with snmpwalk, you'll get everything that printer knows about itself --
caution: this may slow or stop printing on some printers with limited CPU
resources.
________________________________
From: Linux on 390 Port on behalf of Susan Zimmerman
Sent: Tue 9/25/2007 9:15 AM
To: [email protected]
Subject: snmp query
Hi listers,
I was curious if anyone was aware of a product on the market that could run
batched snmp queries against printers and report back the device type/model
to a file. We can use the web browser to display this information... but
it is terribly time consuming to do this for hundreds of printers.
It would be great if it could run on zLinux plus I could ftp that data to
my
workstation to be cut/paste into a word document.
Thanks in advance,
Susan
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390