Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lpr question

Status
Not open for further replies.

BJZeak

Programmer
May 3, 2008
230
0
16
CA
lpr is given a job to spool
lpr -P<printername> -j -w176 -h <filename>
-j returns a job number

The <filename> ends up as /var/tmp/piorlfb_<some randome number>

There is a script /usr/lib/lpd/pio/etc/piorlfb that may be responsible for renaming the print file

Is there anyway I can force lpr and its subprocesses to maintain the original filename?

If not is there anyway to link this random number back the either the job number or the original filename ... a log file ... a process switch ... other ideas?

The files in /var/tmp are being automatically processed into PDF files with the same name which I need to pull back for further processing ... the issue is I haven't been able to find a link from this random number back to the original filename ... this means if there is more then one file in this folder there would be no way to know its origin


 
Further investigation revealed that the qconfig for this printer has a backend setting of piorlfb -f ! -T120
I expect this script is responsible for creating the
/var/tmp/piorlfb_<random-filename>

lpstat -p<printername> actually lists this file name so we should be good to go right? ... nope still have an issue.

lpr -j returns a Job Number which I gather is the only reference we have to go on ... lpstat also lists a job ... the issue now is the two Job numbers don't match?

I stopped and started the Printer Que

Any ideas?

I recall seeing someone complaining about this mismatch on the net but can't seem to find the details on how to correct this job mismatch.







 
It appears the back end process is actually creating a second job ... so when the lpr job is done it just disappears ... the second job is somehow setting an Archive flag so even though it is also complete, lpstat is showing this second job as Archived

man lpr|lpstat doesn't reveal any clues as to how I can archive a print job so not sure what is being done with this back end job.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top