nash@ucselx.sdsu.edu (Ron Nash) (09/21/90)
Is there a way to set up two line printers to appear as one printer queue? We have two laser printer queues that I want the users to see as a single printer. The system is running BSD 4.3. -- Ron Nash San Diego State University Internet: nash@ucselx.sdsu.edu UUCP: ucsd!sdsu!ucselx!nash
C.Elvin@ee.surrey.ac.uk (09/21/90)
Ron Nash <nash@ucselx.sdsu.edu> write: > Is there a way to set up two line printers to appear as one printer queue? > We have two laser printer queues that I want the users to see as a single > printer. The system is running BSD 4.3. One way this can be made to work in BSD 4.3 is to use tty pairs. use a pseudo tty (say /dev/ttyqf) as the device in /etc/printcap. All output sent to ttyqf will be readable on ptyqf so have a process which opens up ptyqf and read print jobs, and then write this input to any number of 'real' printers according to any chosen scheduling strategy. This is a quick and effective solution and it only 'costs' one pseudo-tty pair. A word of advice: rename the pseudo tty pair you use to avoid any possiblre problems with login trying to grab the psuedo device in use. -- Christopher Elvin C.Elvin@EE.Surrey.Ac.UK Dept of Elec. Eng, University of Surrey, "Beware of low flying butterflies!" Guildford, Surrey, GU2 5XH. phone: +44 483 509104 fax: +44 483 34139
pcg@cs.aber.ac.uk (Piercarlo Grandi) (09/26/90)
On 21 Sep 90 11:36:19 GMT, C.Elvin@ee.surrey.ac.uk said: Elvin> Ron Nash <nash@ucselx.sdsu.edu> write: Nash> Is there a way to set up two line printers to appear as one Nash> printer queue? We have two laser printer queues that I want the Nash> users to see as a single printer. The system is running BSD 4.3. Get and install the PLP (public/portable line printer) package or MDQS. Both are available at major FTP sites near you... PLP was also posted (a fairly old version I think) to comp.sources.unix. They are both a definite improvement over BSD or USG line printing, and can be used also for batch jobs etc... Elvin> All output sent to ttyqf will be readable on ptyqf so have a Elvin> process which opens up ptyqf and read print jobs, and then write Elvin> this input to any number of 'real' printers according to any Elvin> chosen scheduling strategy. This is a quick and effective Elvin> solution and it only 'costs' one pseudo-tty pair. Even quicker would be to skip the pty pair business entirely -- tsk tsk. Just use an UNIX domain socket, like the LP daemon does, and write an lpd-to-lpd protocol Y-shaped-pipe daemon; say you listen on '/dev/lp1or2', and each print job is jsut copied to '/dev/lp1' or /dev/lp2', which are the UNIX domain sockets on which the respective 'real' lpds will br listening. Of course using such a Y-pipe filter is less efficient (each job is copied twice again, especially bad for printing stdouts) then using a daemon that will directly manager two output queues. PLP will do that, and also MDQS, if I remember well. -- Piercarlo "Peter" Grandi | ARPA: pcg%uk.ac.aber.cs@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk