Restarting Printer Jobs and lpstat

Joe Trent jtrent at bighamtakeoutbrothers.com
Wed Mar 9 09:14:41 PST 2005


Anonymous wrote:
>>Hi,
>>
>>Maybe I didn't have enought info. Red Hat 9. Cups 1.1.17-13 installed
>>and working with a mixture of dot matrix and post-script printers.
>>PreserveJobHistory Yes. PreserveJobFiles Yes. The print job files are
>>left in /var/spool/cups after printing. I'm trying to restart a
>>completed print job. Tried the following:
>>
>>[root at speedy cups]# cd /var/spool/cups
>>[root at speedy cups]# ls -l *30358*
>>-rw-------    1 lp       sys           630 Mar  5 11:10 c30358
>>-rw-r-----    1 lp       sys          5615 Mar  5 11:10 d30358-001
>>[root at speedy cups]# lp -i 30358 -H restart
>>lp: set-job-attributes failed: client-error-not-possible
>>[root at speedy cups]#
>>
>>Am I doing something wrong? I get something like this message if I try
>>to restart from the browser signed in as root.
>>
>>I can resubmit the job file with 'lp -d printername d30358-001' and it
>>works fine.
>>
>>Also, the following doesn't return any completed job information,
>>although I just printed the job:
>>
>>[trent at speedy data0]$ lpstat -W completed
>>[trent at speedy data0]$
>>
>>lpstat works ok for listing jobs printing or waiting to be printed.
>>
>>Thanks for any input.
>>
>>Joe
> 
> 
> 
> Chech out the following : extract from html manual
> PreserveJobFiles
> Examples
> 
> PreserveJobFiles On
> PreserveJobFiles Off
> 
> Description
> 
> The PreserveJobFiles directive controls whether the document files of completed, cancelled, or aborted print jobs are stored on disk.
> 
> A value of On preserves job files until the administrator purges them with the cancel command. Jobs can be restarted (and reprinted) as desired until they are purged.
> 
> A value of Off (the default) removes the job files as soon as each job is completed, cancelled, or aborted.
> 
> Greetz
> 
> Steven
> 
Steven,

Thanks for the response. I have PreserveJobfiles and PreserveJobHistory 
both set to "Yes" per the info given in cupsd.conf:

# PreserveJobHistory: whether or not to preserve the job history after a
# job is completed, cancelled, or stopped.  Default is Yes.
PreserveJobHistory Yes
# PreserveJobFiles: whether or not to preserve the job files after a
# job is completed, cancelled, or stopped.  Default is No.
#PreserveJobFiles No
PreserveJobFiles Yes

The jobs are still in the directory /var/spool/cups. I just don't seem 
to be able to display them with lpstat or restart them with lp as noted 
above. I can, however, resubmit the file and have it print out fine. ??

Thanks again,
Joe




More information about the cups mailing list