Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Queue Retry 1

Status
Not open for further replies.

miteshdmanek

Technical User
Jul 6, 2004
17
0
0
US
I have set up some print queues on my AIX 5.2 system that keep going into a DOWN state I am not sure if it is related to the application, but as a workaround I would like to put a retry in there. I am not sure of the syntax to use in the /etc/qconfig file. Here is an example of one of the queues from my /etc/qconfig file:

fl050hrp:
device = @fl050hrp
up = TRUE
host = fl050hrp.fl.maycompany.com
s_statfilter = /usr/lib/lpd/bsdshort
l_statfilter = /usr/lib/lpd/bsdlong
rq = HR
@fl050hrp:
backend = /usr/lib/lpd/rembak

Thanks in advance!
 
One thing you could do would be to periodically restart the queue through a cronjob:

/usr/bin/enq -U -P '<queue name>'

run 'smitty spooler' -> Manage Print Queues -> Start a Print Queue, hit 'F4' and select the proper queue. do an 'F6' to get the exact syntax for your situation.

now this does nothing to address why this is happening, it's just a band-aid to keep your spool up.
 
I think that would be a better idea. I am very weak in scripting. Does anyone have a script/syntax for looking for print queues in DOWN state and starting them?

Any help is greatly appreciated. As you can tell I am somewhat of a newbie.
 
Code:
lsallq | while read q
do
 enable $q
done

this just enables all queues - it doesn't hurt to enable a queue that isn't down.

HTH,

p5wizard
 
Looks like that will work. For some reason I was under the impression that resetting an active queue with jobs in it would interrupt the jobs. I guess that is not the case? Thanks for all your help. I'll be putting that script into cron today.
 
Not that I'm aware of, you would only interrupt jobs by disable-ing a queue.


HTH,

p5wizard
 
I notice that your rembak has no timeout. add -T999 to the rembak stanza.backend = /usr/lib/lpd/rembak -T999

This says to keep the queue active for 999 minutes - waiting for any problems to clear.
 
Here is a script that will only restart downed print queues. I have it run via cron every 5 minutes.

Code:
#!/usr/bin/ksh

enq -As | grep "DOWN" | cut -f 1 -d " " | while read ln
do
  enable ln
done

This was originally submitted by another forum member who I cannot remember.

[morning] needcoffee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top