PSF/AIX: Status of the printer and KEEPALIVE
ITEM: BDC000006012
Q:
Topic thread:
Printer Systems (PRINT)
PSF/AIX
PRINT XPSF6000
An LPSTAT command gives status READY, DOWN, INITING...
A customer has noticed that if its Infoprint 4000 is powered off, then
powered on, the lpstat status still shows READY status, but as soon as
a new job arrives in the Q, all devices go down, and it is necessary
to use the command psfctl -u to start printing...
1- Is it normal ?
The timeout connection is set to 0, and keepalive to 10 minutes...
2- Is there a way to avoid this manual intervention ?
3- Can you explain the impact of the keepalive parameter on the lpstat
status, if any...
4- What does exactly the AUTOSTART=YES parameter which can be set in
the AFCCU ? Can it force the lpstat status to go from DOWN to READY?
A:
In PSF's error.log file for the printer, I suspect you're seeing one or
more of the following messages:
0420-111 ERROR: The printer at address is being used
by another instance of PSF or by another Print
Services Facility program.
0420-020 ERROR: Cannot link to the printer at address
0420-049 ERROR: PSF cannot communicate with the printer.
Let me give you some additional information on KEEPALIVE, and then
answer your specific questions.
The TCP transport protocol in the TCP/IP suite does not normally
test inactive connections. So, if a program is waiting for data
from its TCP connection partner, it has no way of differentiating
a partner that isn't sending from an partner that is gone forever.
TCP differs from SNA in this respect. The TCP architects probably
adopted this approach because TCP/IP is designed for WAN's (Wide
Area Networks) and the designers wanted to minimize overhead
transmissions.
Anyway, this means that if one end of a TCP connection terminates
abruptly while the other end is waiting for data, the other end
will wait for ever.
IF THE PRINTER "GOES AWAY"
==========================
Because printers are sometimes terminated abruptly (especially
powered off), PSF for AIX uses the TCP's KEEPALIVE facility to
detect lost connection partners. You must configure the AIX
system-wide TCP KEEPALIVE probe interval as described in the Print
Administration Guide. Then PSF for AIX should detect if a printer
has been powered off after that interval.
If the PSF queues on the AIX system are shutdown gracefully, the TCP
connections with printers will be ended. Then when the printers are
powered on again, the PSF queues can be re-enabled.
IF THE RS/6000 "GOES AWAY"
==========================
In this direction, IBM's TCP/IP-attached IPDS printers do not use
KEEPALIVE. Thus if the AIX system running PSF crashes or is abruptly
powered off or is shutdown with the AIX shutdown command (without
first issuing the psfctl -dt command) while the printer is waiting for
data from PSF, the printer won't know that its connection partner is
gone. It will refuse future connection requests. So, the printer's
TCP/IP attachment will need to be disabled and enabled or the printer
powered off and on.
If the PSF queues on the AIX system are shutdown gracefully, the TCP
connections with printers will be ended. The printers will not enter
the condition where they are waiting on a lost connection partner and
won't need to be re-booted.
To answer your specific questions,
R1) Yes, if the InfoPrint 4000 is powered down without first bringing
the PSF for AIX queue down, PSF for AIX does not know the connection
has been broken and will still show READY status. If you have the
two KEEPALIVE parameters, tcp_keepidle and tcp_keepintvl, set as
described in the "Configuring the TCP KEEPALIVE Frequences" in the
PSF for AIX Print Administration manual (and added to /etc/rc.net
so they take effect for each IPL), then after the retries complete,
the PSF for AIX queue for that printer should be marked DOWN.
The queue will stay DOWN until the operator restarts it with the
psfctl -u command; it will not automatically be reenabled when
the printer is powered back on.
R2) The easy answer is not to power off the printer or disable its
network interface without first issuing the psfctl -dt command
to bring down the PSF queue for the printer. In practice, I realize
one doesn't always have that control. But if an AIX queue is
marked DOWN, it takes a command to bring it back READY, and this
includes PSF for AIX queues: the psfctl -u command must be issued
to bring the print queue back up.
You can use a cron job to check queue status periodically and
if it is down, issue the psfctl -u command to bring it back up.
I have an *unsupported* sample shell script that another customer
wrote for a similar purpose. This is not formal IBM code and we
assume no liability for its use. It's up to you to evaluate it
for your environment.
(Unfortunately left squarebrackets (.), right square brackets
(.), and exclamation points (¢) do not come through my terminal
emulator well, but I've noted where they occur.)
---------------------------------------------------------------------
#¢/bin/ksh
# Program : prtmon In the 1st line, 2nd char is an exclamation (¢)
# Purpose/Description :
# This script will periodically check all printers to see if there
# are any with a status of "DOWN" and restart them.
# Run with CRON
# Check/Reset any printers that show in a 'DOWN' status...
echo `date +%D`_`date +%T` Verifying printer queues and devices.
lpstat | grep DOWN
lpstat | grep DOWN | (
read queue dev restline
while true
do
if . ¢ -z "$queue" . ### . left bracket; . right bracket; ¢ exclam
then
psfctl -u $queue
qadm -U $queue:$dev
fi
read queue dev restline
if . -z "$queue" . ### . is left bracket; . is right bracket.
then
break
fi
done
---------------------------------------------------------------------
R3) Answered above in R1.
R4) From InfoPrint 4000 Operator's Guide S544-5428.
Table 17 Printer Configuration Items:
"Auto Start: If YES, all current attachment interface status
(enabled/disabled) is saved during a SHUTDOWN procedure, and
automatically restored at the next power on of the system.
Simplex and dual simplex printers are also automatically made
READY at the completion of the power on sequence. The Thread/Align
forms procedure must be performed on duplex printers before the
system can be made READY."
This has nothing to do with the status of the PSF queues on the
RS/6000, and it cannot force the status of the queue to change to
READY.
I hope that helps. Thanks for using WWQ&A.
S e a r c h - k e y w o r d s:
psf/6000 psf/aix psf aix AFCCU autostart keepalive no keep_idle
keep_intvl READY DOWN psfctl lpstat status intervention cron queue
tcp/ip polling
WWQA: ITEM: BDC000006012 ITEM: BDC000006012
Dated: 10/1998 Category: XPSF6000
This HTML file was generated 99/06/24~12:43:03
Comments or suggestions?
Contact us