lpq (CUPS client & LPRng server) queries show no jobs

Michael Sweet mike at easysw.com
Thu Dec 9 19:39:40 PST 2004


Dave Botsch wrote:
> Once again, see below...
> 
> On Thu, 09 Dec 2004 18:41:54 -0500, Michael Sweet wrote:
> 
> 
>>David Botsch wrote:
>> > ...
>>
>>>There is not? Then how does the LPRng lpq do it? Briefly looking at 
>>>rfc1179, it looks like it's a simple client/server protocol where the
>>>client sends the "Send queue state" command to the server, gets back
>>>a response, maybe parses the reponse, and prints said response. I
>>>don't think the client needs to actually keep track of the job number
>>>itself.
>>
>>Actually, it does need the job ID.  The lpq and lpstat commands
>>only support IPP - we have no plans or desire to support LPD in
>>these apps - so the only place to track the job is in the LPD
>>backend.
>>
>>Since the LPD print command does not return a job ID, and there
>>is no way to reliably determine the job ID after the fact, there
>>is no way for us to track jobs printed via LPD...
>>
> 
> 
> Since cups knows that the queue is a lpd queue, what is stopping the
> backend from just periodically (or when lpq is called) querying the LPRng
> server and displaying the returned information?

First, the backend exits after the job is done.  If we periodically
poll the LPD server for the list of jobs, we don't know how long
to keep polling.  There is no way for the backend to provide the
kind of information you want to the lpq command.

Second, the backend isn't invoked unless you are sending a job,
so there is no way for lpq to tell cupsd to run the LPD backend
short of sending a short (i.e. 1 byte) print job.

In short, we can't do what you want with the standard LPD protocol.
*If* LPRng provides additional operations which would allow for
reliable job monitoring, then we could conceivably add support for
it, however it can't be done with the standard LPD protocol.

(if CUPS was like LPR or LPRng, then all jobs would go through
a specific server and lpq could query only the remote server,
however that isn't how CUPS works and it uses a different protocol)

>>Actually, it is CUPS -> remote IPP module in Apache -> LPRng.
> 
> 
> I'm interested in at least looking at this. URL?

Should be available on the LPRng web page.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet `Printing and Publishing Software       http://www.easysw.com




More information about the cups mailing list