Richard Conroy
3/27/2007 9:44:00 AM
On 3/27/07, Robert Klemme <shortcutter@googlemail.com> wrote:
> On 27.03.2007 09:55, Ak 756 wrote:
> > I want to write a program to monitor a network printer and give
> > statistic data as whom at what time print how many pages.
> >
> > Is it possible to do this using Ruby? Which library shall I use to do
> > this?
>
> What interface does the printer support? Generally Ruby comes with a
> whole bunch of networking support libraries. It really depends on what
> your printer offers.
The best library for monitoring printers is SNMP. All major manufacturers
will support it. There is a ruby-SNMP project, but it leans a lot on
C libraries for basic support of the protocol (like using your printer
manufacturers MIB file).
Alternatively you could scrape the Web UI of the printer, there must be
at least 6 different Ruby libraries for doing this now.