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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start all dead print queues?

Status
Not open for further replies.

dmjoen

Technical User
Jul 26, 2001
31
US
Does a command exist that will attempt to start all the print queues that are down?

Thanks
 
try this:

login as root

# startsrc -s qdaemon => to start

# stopsrc -cs qdaemon => to stop

 
Startsrc only starts the daemons not the print que.

LSALLQ=`lsallq| grep -Ev "any queues you don't want started"`
lpstat -W | awk '{print $1,$2}' >/tmp/loadfont
for item in $LSALLQ
do
QUE=`grep $item /tmp/loadfont | awk '{print $1}'|head -1`
TYPE=`grep $item /tmp/loadfont | awk '{print $2}'|head -1`
enq -U -P$QUE
if [ $? -ne 0 ]; then
echo " $QUE NOT STARTED "
else
echo "$QUE HAS BEEN STARTED "
fi
done
rm /tmp/loadfont
fi


Try this Learn something everyday or you wasted a day of your life.
 
yeah... you can re-start print queues by:

1. login as root
2. smit->print spooling->manage print queues->start a print queue
3. then select queue/s
 
You also can try this command from console:
(login as root)
lpstat ---> a command to check all printer status
qadm -U'queue_name' ---> a command to activate the printer status from "down" to "ready".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top