[cups] programmatically detect network printer power state

Brian Potkin claremont102 at gmail.com
Wed Jun 1 11:07:55 PDT 2016


On Thu 26 May 2016 at 18:56:00 +0000, Boncek, John wrote:

> With CUPS 1.7.2 under Ubuntu 14.04, I am able to programmatically add
> a network printer (an HP Officejet Pro 6230) at a socket IP address
> and port combination, make it the default printer, and send jobs to
> it.  Now I want to programmatically detect whether the printer is on
> or off, but I haven't been able to find a way to do that.  Regardless

For a printer directly connected to the network you could probe for its
IP address with nmap or ping.

> of whether the printer is on or off, CUPS seems to always report that
> the printer is Idle, Accepting Jobs, etc.  How can I detect the power
> state (if there is a way)?

I think CUPS reports the state of the print queue.

> By the way, my messages to the list seem to unwrap into one very long
> line (I've seen some messages by other people that are also like that)
> - is that a limitation of the list or is there something I can do
> better?  I use Microsoft Office Outlook 2007.

It is not due to a limitation of the list.

Regards,

Brian.



More information about the cups mailing list