How to route a print job

From: arun sanghvi <sanghvi_at_proto.wilm.ge.com>
Date: Mon, 31 Jul 1995 15:54:04 -0400

>From sri_at_jerry.alf.dec.com Mon Jul 31 14:21:03 1995
Received: from ns.ge.com (ns.ge.com [192.35.39.24]) by thomas.ge.com (8.6.12/8.6.12) with ESMTP id OAA16110 for <sanghvi_at_proto.wilm.ge.com>; Mon, 31 Jul 1995 14:07:25 -0400
Received: from mail1.digital.com (mail1.digital.com [204.123.2.50]) by ns.ge.com (8.6.12/8.6.11) with SMTP id OAA07106 for <sanghvi_at_proto.wilm.ge.com>; Mon, 31 Jul 1995 14:14:57 -0400
Received: from decatl.alf.dec.com by mail1.digital.com; (5.65 EXP 4/12/95 for V3.2/1.0/WV)
        id AA20712; Mon, 31 Jul 1995 10:02:00 -0700
Received: by decatl.alf.dec.com id AA04391; Mon, 31 Jul 1995 13:01:58 -0400
Received: by jerry.alf.dec.com id AA03323; Mon, 31 Jul 1995 13:01:57 -0400
From: Sridhar Chirravuri <sri_at_jerry.alf.dec.com>
Message-Id: <9507311701.AA03323_at_jerry.alf.dec.com>
Subject: Script for printer load balancing
To: sanghvi
Date: Mon, 31 Jul 1995 13:01:57 -0400 (EDT)
X-Mailer: ELM [version 2.4 PL24]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 2991
Status: OR

Hi Arun,

        Good luck,

--Sri

---------------------------------------
Sridhar Chirravuri - OSF/Ultrix Support
Digital Equipment Corporation
Customer Support Center
ALF1-3/P26
5555 Windward Parkway West
Alpharetta, GA. 30201
1(800)354-9000 (Ext: 75386)
sri_at_alf.dec.com
---------------------------------------

[Ultrix] How to efficiently utilize two printers in a heavy printing environment

     Any party granted access to the following copyrighted information
     (protected under Federal Copyright Laws), pursuant to a duly executed
     Digital Service Agreement may, under the terms of such agreement copy
     all or selected portions of this information for internal use and
     distribution only. No other copying or distribution for any other
     purpose is authorized.

Copyright (c) Digital Equipment Corporation 1995. All rights reserved.

PRODUCT: Ultrix 4.3

SOURCE: Digital Equipment Corporation


SYMPTOMS/PROBLEM:

In a busy printing enviroment customer can efficiently use two printersi
using the script attached. While one of the printer is printing, the jobs can
be directed to the other print queue. Also, if printer 1 has more jobs
than printer 2 the jobs are routed to printer 2 and vice versa. (Notice
that this script considers the number of jobs only, it doesn't consider
how big a job and how long it may take to print on a printer etc. In a
typical situation a very large printjob can block the rest of print jobs
on a printer because of this routing policy). This script assumes that the
jobs are nearly equal in size/time of printing.

SOLUTION:

The following script can be used the solve the problem.

#!/bin/csh
#
# /usr/lbin/busy_filter
#
cat - > /tmp/print$$
set LP1=`/usr/etc/lpc status lp1 | grep entries | cut -d' ' -f1`
set LP2=`/usr/etc/lpc status lp2 | grep entries | cut -d' ' -f1`
if ($LP1 == "no") then
        /usr/ucb/lpr -Plp1 /tmp/print$$
        rm /tmp/print$$
        exit
else
if ($LP2 == "no") then
        /usr/ucb/lpr -Plp2 /tmp/print$$;
        rm /tmp/print$$
        exit
endif
endif
if ($LP1 == $LP2) then
        /usr/ucb/lpr -Plp1 /tmp/print$$;
        rm /tmp/print$$
else
if ($LP1 < $LP2) then
        /usr/ucb/lpr -Plp1 /tmp/print$$;
        rm /tmp/print$$
else
if ($LP1 > $LP2) then
        /usr/ucb/lpr -Plp2 /tmp/print$$;
        rm /tmp/print$$
endif
endif
endif
exit
#
# Do the following.
# mkdir /usr/spool/lptest;
# chmod 755 /usr/spool/lptest
# chown daemon.daemon /usr/spool/lptest
# chmod 755 /usr/lbin/busy_filter
# chown bin.bin /usr/lbin/busy_filter
#
# The printcap entry for the lptest follows. Please remove the
# "#" infront of the lines and copy these lines to the /etc/printcap
# file and do a "kill -1 1" as super-user.
#
#lptest:\
# :of=/usr/lbin/busy_filter:\
# :sd=/usr/spool/lptest:
#

DISCLAIMER

This script has been developed as a favour to you and doesn't guarantee
support/further development. If you have any questions about this
script you have to proceed on your own. Digital doesn't support this
script as a part of any contract.
Received on Mon Jul 31 1995 - 22:07:24 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT