Operating System - HP-UX
1821642 Members
3391 Online
109633 Solutions
New Discussion юеВ

two queue's for the same physical printer

 
SOLVED
Go to solution
Unix Administrator_5
Frequent Advisor

two queue's for the same physical printer

I need to set up two queues for the same printer.

Is this standard? If so, what happens when two queues contend for the same physical printer at the same time?
9 REPLIES 9
Dave Chamberlin
Trusted Contributor

Re: two queue's for the same physical printer

I have had occasion to need two or more aliases for the same printer (using the /etc/hosts file to resolve multiple names to the same printer), but never a need for multiple queues. I dont think that two queues would "contend" for the printer - the printer will just print them as they come...
A. Clay Stephenson
Acclaimed Contributor

Re: two queue's for the same physical printer

I assume this is probably a network printer. The device will appear to be busy to one of the jobs. As soon as the printer is free the next job will be sent. This will be no problem.
In fact, it's the same problem if multiple hosts have the same physical printer defined and that works too.
If it ain't broke, I can fix that.
Jeff Schussele
Honored Contributor

Re: two queue's for the same physical printer

Although I've never done it, I believe it can be done.
It would be the only way to use 2 (or more) models for the same printer.
Example - printer does not auto-detect PCL & PS. You'd set one for PCL & one for PS.

I believe it would be a FIFO situation whichever hits first is serviced first.
Worst-case scenario, queue1 hits first. queue2 is not serviced at all until queue1 is empty.
But I think the FIFO would go down to the job level & be serviced based on job time-stamp.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Rich Wright
Trusted Contributor

Re: two queue's for the same physical printer

I have done this by having the printer defined as a "remote" printer to each extra print queue.
For example:
(All on same HostA)
printerA -> printer
printerB -> remote (printerA on HostA)
printerC -> remote (printerA on HostA)
Then you can disable/enable queues "printerB" and "printerC" to control flow to "printerA"

This is the only way that I know of doing it.
Michael Tully
Honored Contributor

Re: two queue's for the same physical printer

Hi,

This is quite a common thing to happen with the use of line printers. We still use it at one warehouse. What we do is to have a print queue for 2 part paper and one for 4 part paper. The procedure that is followed.

Both printers are disabled.
The job is run by the operators to which ever queue they wish to use.
Once the job has finished going to the print spooler, they will release it by enabling the printer. Once the job has finished printing, the queue will be disabled again. I see no difference in using a method like this than using a network laser printer, as long as the control is done by enabling/disabling of the print queue. You could even use a script to do this.

Michael
Anyone for a Mutiny ?
Bill Hassell
Honored Contributor
Solution

Re: two queue's for the same physical printer

For locally connected printers (ie, serial or parallel), there is no file locking so two jobs printing to the printer will be interleaved (lines from 1 job are inserted into lines from another job). The only successful method is to use a remote print server (Unix or PC), or network printers.

HP has two methods: JetDirect proprietary protocol (must use the HP Printer Installer or the older JetAdmin software), or setup the network printer as a remote printer. By far, the recommended way is HP's protocol as remote printers have severe limitations on lp options.

To add 3 queues to the same printer:

addqueue -h 12.34.56.78 -q prn1
addqueue -h 12.34.56.78 -q prn2
addqueue -h 12.34.56.78 -q prn3

Now, jobs can go to all the printers at the same time, and normal network protocol for opening a single socket connection will keep the jobs separated. With the 3 queues, you can customize the default options in the printer scripts stored as prn1, prn2 and prn3 in the /etc/lp/interface/model.orig. The scripts are lengthy but the defaults are fairly easy to understand.


Bill Hassell, sysadmin
KapilRaj
Honored Contributor

Re: two queue's for the same physical printer

What's wrong in it ?. Just go for it. I hv tested it & found workin fine

kaps
Nothing is impossible
Nick Wickens
Respected Contributor

Re: two queue's for the same physical printer

We have done this a few times for networked printers using jetdirect with no problems.
Hats ? We don't need no stinkin' hats !!
Peter Brimacombe
Frequent Advisor

Re: two queue's for the same physical printer

thanks to Jeff Schussele, he has confirmed what I thought. I set up two queues for our HP plotters - one for Post Script and one for hpgl2 - because the auto detection doesn't always work. The plotters are connected via HP Jet Direct cards.