From Wiki-UX.info

Wiki-UX / LP Spooler / HP-UX remote spooling
Jump to: navigation, search

HP-UX remote spooling

Abstract

This article explain how to configure HP-UX remote spooling (printing).

Work in progress!

Contents


What is HP-UX remote spooling

Set a Remote Printer Queue to a Remote Printer

Set a Remote Printer Queue to a Remote Class

As a matter of example:

1. On printer server delta, check the available printers

# lpstat -t
scheduler is running
system default destination set in default file: 4345mfp
device for 4345mfp: /dev/null
4345mfp accepting requests since Nov  2 16:46
printer 4345mfp is idle.  enabled since Nov  2 16:46
        fence priority : 0
no entries

2. Add m4345mfp printer to the laser class

# lpadmin -p4345mfp -claser
# lpstat -claser
members of class laser:
        4345mfp

3. On the local server, add a Remote Printer/Spooler. Set the local name you want, the remote server (delta) and the name of the printer or class (laser).

+ ===                  Printer and Plotters (swtape01) (1)                     +
¦File List+           Add Remote Printer/Plotter (swtape01)          +    Help ¦
¦         ¦                                                          ¦         ¦
¦Print Spo¦             Printer Name:  laser                         ¦INED     ¦
¦---------¦                                                          ¦---------¦
¦Printers ¦       Remote System Name:  delta                         ¦ selected¦
¦---------¦                                                          ¦---------¦
¦         ¦      Remote Printer Name:  laser                         ¦         ¦
¦  Name   ¦                                                          ¦         ¦
¦+--------¦ [ ] Remote Printer is on a BSD System                    ¦-------+ ¦
¦¦        ¦                                                          ¦       ^ ¦
¦¦        ¦ [ Remote Cancel Model... ] rcmodel                       ¦         ¦
¦¦        ¦                                                          ¦         ¦
¦¦        ¦ [ Remote Status Model... ] rsmodel                       ¦         ¦
¦¦        ¦                                                          ¦         ¦
¦¦        ¦ Default Request Priority:  [ 0  ->]                      ¦         ¦
¦¦        ¦                                                          ¦         ¦
¦¦        ¦ [X] Allow Anyone to Cancel a Request                     ¦         ¦
¦¦        ¦                                                          ¦         ¦
¦¦        ¦ [X] Make This Printer the Default Destination            ¦         ¦
¦¦        ¦----------------------------------------------------------¦       v ¦
¦+--------¦ [   OK   ]             [ Cancel ]             [  Help  ] ¦-------+ ¦
¦         +----------------------------------------------------------+         ¦
+------------------------------------------------------------------------------+
+ ===                  Printer and Plotters (swtape01) (1)                     +
¦File List View Options Actions                                           Help ¦
¦                       Press CTRL-K for keyboard help.                        ¦
¦Print Spooler: RUNNING                   Default Destination: laser           ¦
¦------------------------------------------------------------------------------¦
¦Printers and Plotters                                          0 of 1 selected¦
¦------------------------------------------------------------------------------¦
¦                   Enabled     Accepting                                      ¦
¦  Name    Type     To Print    Requests    Location                           ¦
¦+---------------------------------------------------------------------------+ ¦
¦¦ laser   remote   yes, idle   yes         laser on delta                   ^ ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                           v ¦
¦+---------------------------------------------------------------------------+ ¦
¦                                                                              ¦
+------------------------------------------------------------------------------+
* Attempting to add the printer "laser" to the lp spooler.
    * Executing:
          /usr/sbin/lpadmin -plaser -ormdelta -orplaser -mrmodel -v/dev/null \
          -ocmrcmodel -osmrsmodel
    * Command succeeded.
    * Making "laser" the lp spooler's default destination.
    * Executing:
          /usr/sbin/lpadmin -dlaser
    * Command succeeded.
    * Telling the lp scheduler to accept print requests for "laser".
    * Executing:
          /usr/sbin/accept laser
    * Command succeeded.
    * Telling the lp scheduler to enable "laser" to print accepted print
      requests.
    * Executing:
          /usr/bin/enable laser
    * Command succeeded.
    * lpmgr done, exit value is 0.
    * Command completed with exit status 0.
----- Adding "laser" succeeded.

Remote spooling to other UNIX systems

Using ob3 flag

The -ob3 of lpadmin command option needs to be use to support HP-UX printing to non HP BSD (lpd) remote printers. Don't confuse with network printers. For example:

# lpadmin -p<queue_name> -ob3

The manpage of the lpadmin is confusing, because may you believe that the only function of this flag is to use ... "three-digit request numbers associated with the printer directory. Use this option while configuring remote printer queues to BSD systems".

Additional information is available on the patch release.

ob3 option needs to be enabled for 11.23. The line printer
	spooler shipped in 11.23LR has ob3 option disabled and as a
	result one would face the following problem.
	a. rlp is not filtering non RFC entries while sending print
	   request to BSD systems.rlp sends the hpux specific
	   (non RFC) entries for priority, Remote write, printer
	   options and bannerpage in the control file to the remote
	   system.The request with these non RFC entries can be
	   sometimes misinterpreted or rejected by non HPUX systems.
	b. The number of pending request the remote queue can hold
	   is always limited to 1000.On a HPUX 11.11 system one can
	   configure remote printers with the queue size upto 10000
	   requests. On 11.23LR the size of remote printer queue is
	   limited to 1000 for all cases.
 
	Resolution:
	The ob3 option is enabled now. If a remote printer is
	configured with ob3 option the following properties will
	be displayed with print requests.
	1. The request number will still be 3 digits and the control
	   and data file names will be RFC compliant.
	2. The non RFC entries in the control file will be
	   filtered before sending the request to remote system.
	3. The queues holds a maximum of 1000 pending print
	   requests.
	If the printer is configured without ob3 option, the print
	request will have the following properties.
	1. The request number will be 4 digits.
	2. The non RFC (HPUX specific) entries will not be
	   filtered out.
	3. The queue holds a maximum of 10000 pending print
	   requests.
	Note:
	1. Use the ob3 option only while cofiguring remote
	   printers to non HPUX system.
	2. Printer configured with the lp bits of 11.23LR will
	   still continue to behave as it is unless the printer
	   is reconfigured.

Redirect print job to a file

The bad data looks like binary data such as that from an executable program or library file. Does the report write anything except ASCII text (ie, graphics, pictures, logo, any font changes at all)? If so, this looks like a sync error where an escape sequence to load a font was corrupted and you're seeing the raw font bit patterns.

The only way to copy the the data file is to add cat within the model script for the printer. Remote printers all use the same rlp script. Look at the end of the script and you'll see a line line this:

# /usr/sbin/rlp -I$requestid $BSDC ...

Just insert

# cat $1 > /somefile

to copy the printfile. Now this will just overlay /somefile for each print job which may not be what you want. Change the /somefile to something like:

# cat $1 > /var/tmp/${requestid}.$$

Each print file will have the spooler request id plus the PID of the script when it runs. NOTE: /var/tmp should be very large (several hundred megs) or better yet, specify a special mountpoint for the files.

Reference

Authors

This page was last modified on 19 July 2010, at 20:35. This page has been accessed 2,707 times.