-- /* Christoph Beyer | Office: Building 2b / 23 *\ * DESY | Phone: 040-8998-2317 * * - IT - | Fax: 040-8998-4060 * \* 22603 Hamburg | http://www.desy.de */
Dear Christoph Beyer,First of all thank you very much for your helpful advice.
I am writing to you because I have a new question regarding how the spooler sleeps when it tries to send a jog to a busy printer. You told me last week to use send_try=0 to prevent the spooler from removing jobs from queue when trying to send them to a busy printer. Following your advice jobs aren't removed but sleeping time behaves quite extrange, as shown at the following example:
EXAMPLE:
(JetDirect is busy attending another connection)
(:connect_interval=3)roger@tester2:/etc$ lpr printcap
roger@tester2:/etc$ lpq
...
Status: cannot open '147.83.92.57%9100' - 'Connection refused', attempt 1, sleeping 3 at 13:44:57.576
...roger@tester2:/etc$ lpq
...
Status: cannot open '147.83.92.57%9100' - 'Connection refused', attempt 2, sleeping 6 at 13:44:57.576
...roger@tester2:/etc$ lpq
...
Status: cannot open '147.83.92.57%9100' - 'Connection refused', attempt 3, sleeping 12 at 13:44:57.576
...roger@tester2:/etc$ lpq
...
Status: cannot open '147.83.92.57%9100' - 'Connection refused', attempt 4, sleeping 24 at 13:44:57.576
...roger@tester2:/etc$ lpq
...
Status: cannot open '147.83.92.57%9100' - 'Connection refused', attempt 5, sleeping 48 at 13:44:57.576
......
The question is the following: How could i specify a constant sleeping interval? (I've tried to use connect_grace=<seconds> with retry_nolink option as the base of sleeping time, but it doesn't work as expected)
Thank you very much again, and sorry for anoying you.
best regards,
roger
Christoph Beyer wrote:
hi,you can define the number of retrys in the printcap or global in the
lpd.conf:send_try=<number>
<0> is infinite...
don't forget to do a 'lpc reread' after having changed the parameters !
regards Christoph
On Mon, 4 Dec 2000, Roger Baig wrote:
> Linux Version: 2.2.17
> LPRng: 3.36.12
> ifhp: 3.3.10
> PRINTER: hp5m
> INTERFACE: JetDirect
>
> I would like to know how to specify unlimited attemps to send a job
> to a busy JetDirect. Now if the printer is busy, the spooler just tries
> six times to get the job printed (as shown in the example below) and if
> the printer is still busy it removes the job from queue with the message
> JREMOVED. I'm attaching an example of the messages got in this case with
> lpq command:
>
> EXAMPLE:
>
> (JetDirect is busy attending another connection)
> (:connect_interval=3)
>
>
> root@tester2:/etc# lpr printcap
>
> root@tester2:/etc# lpq
> Printer: lp1@tester2 'HP LaserJet 5M (ifhp)'
> Queue: 1 printable job
> Server: pid 1020 active
> Unspooler: pid 1021 active
> Status: cannot open '147.83.92.57%9100' - 'Connection refused',
> attempt 1, sleeping 3 at 11:13:47.346
> Filter_status: (of) done at 10:00:01.603
> Rank Owner/ID Class Job Files Size
> Time
> active root@tester2+18 A 18 printcap 561
> 11:13:44
>
> root@tester2:/etc# lpq
> Printer: lp1@tester2 'HP LaserJet 5M (ifhp)'
> Queue: 1 printable job
> Server: pid 1020 active
> Unspooler: pid 1021 active
> Status: cannot open '147.83.92.57%9100' - 'Connection refused',
> attempt 2, sleeping 6 at 11:13:52.865
> Filter_status: (of) done at 10:00:01.603
> Rank Owner/ID Class Job Files Size
> Time
> active root@tester2+18 A 18 printcap 561
> 11:13:44
>
> root@tester2:/etc# lpq
> Printer: lp1@tester2 'HP LaserJet 5M (ifhp)'
> Queue: 1 printable job
> Server: pid 1020 active
> Unspooler: pid 1028 active
> Status: cannot open '147.83.92.57%9100' - 'Connection refused',
> attempt 1, sleeping 3 at 11:14:04.096
>
> root@tester2:/etc# lpq
> Printer: lp1@tester2 'HP LaserJet 5M (ifhp)'
> Queue: 1 printable job
> Server: pid 1020 active
> Unspooler: pid 1028 active
> Status: cannot open '147.83.92.57%9100' - 'Connection refused',
> attempt 2, sleeping 6 at 11:14:09.735
> Filter_status: (of) done at 10:00:01.603
> Rank Owner/ID Class Job Files Size
> Time
> active(attempt-2) root@tester2+18 A 18 printcap 561
> 11:13:44
>
> root@tester2:/etc# lpq
> Printer: lp1@tester2 'HP LaserJet 5M (ifhp)'
> Queue: 1 printable job
> Server: pid 1020 active
> Unspooler: pid 1035 active
> Status: cannot open '147.83.92.57%9100' - 'Connection refused',
> attempt 1, sleeping 3 at 11:14:20.650
> Filter_status: (of) done at 10:00:01.603
> Rank Owner/ID Class Job Files Size
> Time
> active(attempt-3) root@tester2+18 A 18 printcap 561
> 11:13:44
>
> root@tester2:/etc# lpq
> Printer: lp1@tester2 'HP LaserJet 5M (ifhp)'
> Queue: 1 printable job
> Server: pid 1020 active
> Unspooler: pid 1035 active
> Status: cannot open '147.83.92.57%9100' - 'Connection refused',
> attempt 2, sleeping 6 at 11:14:26.084
> Filter_status: (of) done at 10:00:01.603
> Rank Owner/ID Class Job Files Size
> Time
> active(attempt-3) root@tester2+18 A 18 printcap 561
> 11:13:44
>
> root@tester2:/etc# lpq
> Printer: lp1@tester2 'HP LaserJet 5M (ifhp)'
> Queue: no printable jobs in queue
> Status: removing job 'root@tester2+18' - JREMOVE at 11:14:34.573
> Filter_status: (of) done at 10:00:01.603
>
>
>
> I have the following /etc/printcap
> /etc/printcap
>
> lp1|hp5mifhp
> :cm=HP LaserJet 5M (ifhp)
>
> # force clients
> :sh
> :pw#80
> :pl#72
> :px#1440
> :mx#0
> :sd=/var/spool/lpd/hp5mifhp
> :af=/var/log/lp-acct
> :lf=/var/log/lp-errs
>
> # :lp= printer ip%port
> :lp=147.83.92.57%9100
> :connect_interval=3
>
> # ifhp filter
> :ifhp=model=hp5m,a4,duplex,portrait
> :if=/usr/lib/filters/ifhp
> :of=/usr/lib/filters/ifhp
>
>
>
>
> Best regards.
>
> roger
>
>
