From: Ben Woodard <ben@va...> - 2001-01-30 19:47:41
While working on a problem that Alain Lachapelle is having with
npadmin I had to get myself configured to look at the snmp objects of
a printer. This is a useful thing to know because it allows you to
find out quite a lot about a printer over the network. For example, I
used to do silly things like. Check the pagecount of a remote
printer. Send a print test page. Check the pagecount again. If it
increased by one then the printer is working fine. Another favorite
trick of mine was to poll all 3000 printers at Cisco to find out which
ones needed service. That is really what npadmin was designed to do.
So I thought that. I'd take a few minutes and give a brief tutorial on
how to use the primitive snmp commands. You can use the net-snmp tools
to examine the literally thousands of pieces of data in a printer.
The first thing that you have to do is get the right mibs:
The first one that you will need is the printermib
Then you will need any mibs you might need for any printers that you
might want to look at:
As an example I grabbed:
Unzip the ones from HP and then copy all the mibs to
/usr/share/snmp/mibs/ (might be /usr/local/share/mibs/ on your system)
Then "export MIBS=ALL".
This will allow you to get and set objects for the printer.
To see the full menu of what is available you can do:
snmpwalk <printerip or hostname> public .1
I'll leave the rest of the topic to the netsnmp manpages see: snmpcmd,
snmpset, snmpget, snmpwalk
Get latest updates about Open Source Projects, Conferences and News.