[cups-devel] How to constantly monitor local printer status

Michael Sweet msweet at apple.com
Wed Nov 5 04:05:10 PST 2014


Daniel,

There is no standard mechanism in CUPS for monitoring printers when a job is not processing.

However, there are third-party applications running on top of CUPS that do such things, either by polling or through SNMP traps.


> On Nov 5, 2014, at 6:43 AM, Daniel Wagener <daniel.wagener at kernelconcepts.de> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello list,
> 
> I was wondering how some printers manage to propagate their state to
> the server without a job running. I.e. the user will see cover-open
> almost as soon as the cover is opened on the printer even when the
> printer is idle.
> 
> I know I can query a printer using a comand filter by sending a
> commandfile, but that requires an action from the other side of the
> backend.
> 
> As far as I can tell, one would need a program that constantly polls
> the printer via the backend (as not every printer sends data to the
> backend when not explicitly queried), however that certainly can't be
> a print job, as this would block the queue or require to repeat a
> print/command job at some interval.
> 
> In the list's archive I stumbled upon a mail that stated, that it was
> planned to have port monitors do exactly this, however, the
> documentation does not mention port monitors besides the usual filter
> chain when doing a print or command job.
> 
> Searching for "printer state" seems to always end up at "filter and
> backend programming", but again that only explains it in context of a
> print job.
> 
> Is there a way to constantly poll printers using CUPS? Did I miss
> something?
> 
> 
> Regards
> 
>  Daniel Wagener
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> 
> iQEcBAEBAgAGBQJUWg1UAAoJEFnf1IDLMXhxJVYH/2dbU57qZDn45/sLDm/J1v1A
> n998MXWQnyF5wIq37rKZnFBDWt889+8VPn4trKiChaF+B4fKZMxWLzIOw9TuybUw
> c4QJ0B/MvNvQq/jwoTu/THBONr69kpG6gj67iVN7bWlvZiFyc0wmXDjrH7WPXNEQ
> pIfIBItvIHiimUF2ghupiKCNBgbunCofSztJ1OdSx9kVJubgdAgub4E+ztrA/e94
> E6jLt2QM0vVv/vU5+tMnEG5ulWsWapYI7zIxaojqpEdg/YGZOCe+CB2j5YoyVzO2
> n1DII3CblbgwhFidyYiiszVHU9RGYdAFy+KXGyKsoX6xoKpZqeNmmfxBGC4PO90=
> =pLpk
> -----END PGP SIGNATURE-----
> _______________________________________________
> cups-devel mailing list
> cups-devel at cups.org
> https://www.cups.org/mailman/listinfo/cups-devel

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair



More information about the cups-devel mailing list