>I have a printer server on a Solaris 2.6 box. It also has HP's
>jetadmin software on it. In addition I have two HP laser printers
>that I've just placed on the network that have JetDirect ethernet
>cards. What I'd like to do is create one printer queue that would
>load balance between the two printers. I am pretty sure there is a
>way to do this. I forgot how.
Hi Ernie! Long time no see! (remember Netcom?)
There's a simple method, and a more complex method that you'll
need to roll-your-own with.
The simple method is a printer class. Create the two printer
queues in Jetadmin, then add them to a class:
lpadmin -c class-name -p printer1
lpadmin -c class-name -p printer2
Then have your users print to the class name as if it was a
printer queue. Then print jobs will go to the printer that's
the least busy. I.e. if printer1 has jobs in its queue, then
the new job will be given to printer2. If both the printers
are idle (or equally busy), then the job will be given to the
first printer added to the class.
This means printer1 will, in most situations, get most of
the print jobs. Printer2 will only print when printer1 is
already printing something.
If you want print jobs distributed evenly between the printers,
then you'll need to implement the more complex method.
The more complex method would be to create two printer queues
with Jetadmin, then create a fake local printer queue with lpadmin.
Edit the local queue's interface script in /etc/lp/interfaces
to keep track of which printer received the last job, then
forward the new job to the other printer with lp.
A variation on this scheme is to keep the fake printer queue
disabled (but accepting new jobs into the queue). Then a cron
job checks the queue every minute and uses lpmove to distribute
the queued jobs to the real printer queues in round-robin order.
I have a map of the United States that's actual size
-- Steven Wright