1833760 Members
2631 Online
110063 Solutions
New Discussion

Re: Duplicate prints.

 
Mark Penfold
Occasional Contributor

Duplicate prints.

Hi
We have a small routine that recognises files coming into a directory and issues lp commands against the files to direct them to one of two remote printers.
What happens intermittently, is that some of the prints are being duplicated, which when they are very large, isn't good.
I'm pretty sure that it isn't the code which recogonises the files arriving, that is at fault, as if we were issuing the lp command more than once against the same file it would have a different id number.
The same print request is being printed more than once. Here is a sample from the /var/adm/lp/log
p52_largestdtp-4 root p52_largestdtp Apr 7 10:47
p52_largestd-26 root p52_largestd Apr 7 10:47
testlj4-51 tbrowse testlj4 Apr 7 10:47
p52_largestdtp-5 root p52_largestdtp Apr 7 12:09
p52_largestd-26 root p52_largestd Apr 7 12:09
testlj4-56 sbaldwin testlj4 Apr 7 12:14
This clearly shows p52_largestd-26 being printed at 10:47 and again at 12:09.
The spooler was not shut and restarted between these times.
When an lpstat -o command was issued, after the file had first finished printing, it was still shown as being in the queue, with the same time and request-id. It then proceeded to start to print again, until we cancelled it.
I know stopping and starting the spooler will cause prints already printing to be reprinted, but this hasn't happed in this instance. I know that lpstat can't be relied upon to accurately tell you what is in the queue (from the man pages), but normally we see this as jobs disappearing from the Unix output whilst the printer is still printing.
Any ideas anyone?
Thanks
Mark Penfold
2 REPLIES 2
RAC_1
Honored Contributor

Re: Duplicate prints.

I think this is because, somehow, the lpsched does not get scomplete status for print job. Can you add -m option to lp command and check if user gets a email when print job finishes? I doubt you will not get it.

This where you should start looking.
Also you can stop lpsched and start it with lpsced -v, so that you get something more meaningful in lp log to investigate.

Anil
There is no substitute to HARDWORK
Mark Penfold
Occasional Contributor

Re: Duplicate prints.

Anil
Thanks for the reply. I think I've tracked it down to a rogue piece of code disabling and then re-enabling the queue, which has the same effect on prints as a spooler restart. I will be using the -v option in future though, to make things easier to track down.
Mark