HPlogo Native Mode Spooler Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 3 Configuring and Operating Network Printers

Creating the Network Printer Configuration File

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

The network printer configuration file NPCONFIG.PUB.SYS is a flat ASCII file that the system manager creates and modifies using a text editor. The purpose of the NPCONFIG file is to supply to the system additional configuration data about network printers that is not defined in SYSGEN. The NPCONFIG configuration file is designed to be extensible. As needed, for example, when placing a new network printer in service, the system manager may update the entries in NPCONFIG.

At a minimum, NPCONFIG must have the following information:

  • An LDEV-specific entry for each network printer.

  • The printer's network address, which is either its numeric IP address or a domain name which the spooler can resolve to its IP address.

For example, a complete though minimal entry in NPCONFIG for the network printer designated as LDEV 19 might be:

   19     (network_address = 192.187.63.25)

Most NPCONFIG files will also have one global entry whose items are applicable to all network printers. This makes it convenient to configure a group of printers that belong to the same "family" since it is unnecessary to repeat identical configuration items for each LDEV entry. (With one exception, setup_file, items found in the LDEV specific entries take precedence over those in the global entry.) For example, a global entry for a group of LaserJet 4Si printers might look like this:



   global (setup_file = LJ4SISET.HPENV.SYS      # LaserJet 4Si setup file.

           message_interval = 60                # Repeat msgs every >= 60 secs.

           banner_intray = 1                    # Upper tray has colored banner

                                                #   paper.

           banner_trailer = FALSE               # Only need a header page.

           pjl_supported = TRUE                 # LJ4Si is a full PJL device.

           jam_recovery = TRUE)                 # Reprints jammed pages by itself.

Any text that follows the pound sign (#) are comments, and can help make the NPCONFIG file self-documenting.

It isn't necessary to enter values for every possible item in either a global or LDEV-specific entry. Items that you do not specify automatically assume the default values. The "Items in an NPCONFIG entry" section, later in this chapter, describes each item in detail and includes its default value. For a brief overview of the items, refer to table 3-2.

For further reference, two sample configuration files and an explanation of the setup files they reference are included in this chapter. Read "A Small Sample Configuration" and "A Large Sample Configuration" for more information.

Syntax of NPCONFIG entries

When you add an entry to NPCONFIG, it must conform to a specific syntax. The entry consists of an entry_id which is either the keyword global for the one global entry in NPCONFIG, or the LDEV number of the network printer you are adding to the configuration (without leading zeros). The remainder of the entry is composed of keywords which indicate the item you are defining and the value you assign to it. So, the syntax of each entry is:

   <entry_id> ( <keyword1>=<value1>

                <keyword2>=<value2>

                ... 

              )

You may enter individual items in any order, one per line. Whitespace is optional except where required to delimit a token. All text between the pound sign (#) and the end of the line is treated as comment.

All text is case-insensitive except when it is part of a string. Thus, you can type the global entry specification as "GLOBAL", "global", "GlObAl", or any other combination of upper- and lowercase letters spelling "global".

For example, here is a global entry which sets the value of only one item, the poll interval:

   global (poll_interval=5)

Here is an example of an entry for LDEV 19:

   19     (poll_interval = 15

           network_address = 15.13.194.150

           program_file = OUTSPTJ.PUB.SYS)

Items in an NPCONFIG entry

The table on the next page briefly describes each of the items used in the NPCONFIG file and lists the default value. Following the table, each of the items is described in detail.

Table 3-2 Summary of NPCONFIG File Items

ItemDefinition
network_addressNetwork address of the printer, specified either as an IP address or as a domain name that resolves to an IP address. This item is required. No default.
TCP_port_numberPort number used by the spooler to establish a TCP connection to the target printer. Default = 9100.
program_fileName of the output spooler program file invoked for the network printer. Default is OUTSPTJ.PUB.SYS.
poll_intervalInitial time interval, in seconds, that the spooler waits to retry connecting to the printer. Default is 10 seconds.
poll_interval_maxMaximum amount of time, in seconds, that the spooler waits to retry connecting to the printer. Default is poll_interval.
setup_fileFully-qualified MPE/iX name of a file containing information for a printer setup string. No default.
run_priorityScheduling queue assigned to the output spooler process. Default is CS.
SNMP_get_community_nameThe "SNMP Get Community Name" for this printer, which determines who can check printer status. Default is ALL.
data_timeoutAmount of time, in seconds, that the spooler waits for a specific network I/O request to complete before verifying that the printer and network are functioning correctly. Default is 10 seconds.
snmp_timeoutAmount of time, in seconds, that the spooler waits for a printer status check to complete. Default is 5 seconds.
snmp_max_retriesNumber of times that the spooler should cycle through printer status checking before consulting message_interval to display error/warning messages. Default is 3.
message_intervalMinimum interval, in seconds, at which a printer status message is redisplayed, as long as it applies. Default is 0, which displays the message only once.
banner_intraySends a paper source command to the printer to allow banner pages to be taken from a separate paper tray. No default.
data_intraySends a paper source command to the printer which specifies the paper tray for normal data pages. No default.
banner_header and banner_trailerDetermines whether or not spool files are printed with a header, a trailer, both, or neither. Default is TRUE. The CI command HEADOFF overrides these settings.
pjl_supportedSpecifies whether or not the spooler tests a printer to see if it can effect Page Level Recovery and actual Page Count Logging. No default.
jam_recoverySpecifies whether or not the spooler invokes its own jam recovery procedure. Default is FALSE.
socket_traceWhen ON (enabled), initiates a socket-level trace of the TCP connection. Default is OFF.
transport_traceWhen ON (enabled), initiates a TCP-level trace of the socket in addition to a socket-level trace of the TCP connection. Default is OFF.
default_page_sizeThe Banner page size can be specified. Default is Letter.

 

Each of the items that you can use in an network printer entry in the NPCONFIG configuration file is described below.

Table 3-3 Description of NPCONFIG File Items

ItemDescription
network_address

The network address of the printer, required for LDEV-specific entries but meaningless if used in a global entry. You may specify the address in one of two forms:

  • As an IP address consisting of four numeric fields in the form aaa.bbb.ccc.ddd. The address may be expressed in hexadecimal, octal, or decimal numbers.

  • As a domain name. If the aaa field begins with a letter, OUTSPTJ interprets value as a domain name, and tries to resolve it into an IP address.

For more information, read "Entering a numeric IP address correctly," later in this chapter.

TCP_port_number

An integer between 1 and 32767 (inclusive) that identifies the port number by which the spooler establishes a TCP connection to the target printer. If you specify any other number (including 0) for TCP_port_number, OUTSPTJ will replace it with the default value of 9100. Optional.

For example, to configure two printers on ports 2 and 3 of a JetDirect Ex+3 interface, configure the printer connected to port 2 with TCP_port_number 9101 and the printer connected to port 3 with TCP_port_number 9102.

program_fileThe name of the output spooler program file invoked for the TCP/IP network printer, which is OUTSPTJ.PUB.SYS. The program file name is case-sensitive and must be fully-qualified. You may also specify this file name using POSIX syntax, i.e. /SYS/PUB/OUTSPTJ. If you enter any other name for program_file, you will see an error message at spooler process start time and no spooler process is created. (Refer to the "OUTSPTJ.PUB.SYS spooler program file" section for more information.) Optional.
poll_interval

If the printer is unavailable to print a file, this is the initial time interval, in seconds, that the spooler waits before again attempting to connect to the printer. The default is 10 seconds. If you specify another value, it must be a positive integer. Optional.

This value only has meaning when the spooler process is not suspended, when there is a file to print, and when the printer is busy or unavailable. This may happen, for example, if the printer's network interface is powered off or if another host on the network already has a connection to the printer.Do not confuse poll_interval with the polling performed by many third-party spooling solutions to determine if a spool file is available for printing.

poll_interval_max

The maximum amount of time, in seconds, that the spooler waits before again attempting to connect to the printer. The default is the current value for poll_interval. Optional.

After the spooler fails to establish a network connection to its printer the first time, it waits the number of seconds determined by poll_interval before polling the printer again. Thereafter, each time it fails to establish the connection, it increases the poll interval by 25%, up to the absolute value specified by poll_interval_max. If the absolute value of poll_interval_max is less than poll_interval, the spooler uses the value of poll_interval.

The spooler only uses the absolute value of poll_interval_max to limit the polling interval. The sign preceding the integer (+ or -) determines whether or not a message that the limit has been reached is displayed on the console or Associated device. If you specify a negative value, the spooler displays a message. If you specify a positive value, no message is displayed.

setup_file

The fully-qualified MPE name of a file containing printer setup information. The setup file can be either a bytestream file or a record-oriented file. If the file is a record-oriented file, any carriage control (CCTL) byte is deleted, all leading and trailing blanks of each record are deleted and the remaining information is concatenated. The default is no setup file.

If you insert setup_file in the global entry, it applies to all network print requests (unless the print request includes its own ENV specification). If setup_file appears in an LDEV-specific entry, the contents are appended to any specification in the global entry unless the print request includes its own ENV specification.

The setup information can be anything that makes sense to the printer, including complex Printer Command Language (PCL) sequences or a combination of PCL and Printer Job Language (PJL) sequences for those printers that support PJL. The spooler does not check the contents of the setup file. Therefore, users should consult appropriate PCL and PJL documentation for their printer before attempting to construct a setup file.

run_priority

The scheduling queue to which the output spooler process is assigned when it is created. Acceptable values are BS, CS, DS, or ES. The default value, CS, is used if you specify any value other than these choices.

Spooler processes for system printers (HP2680, HP5000, etc.) are created in the BS queue because there are few such printers on a given system and because they require a constant stream of data to avoid warmup cycles and repositioning the paper. Spooler processes for serial printers (i.e. those connected via a DTC) always run in the CS queue and cannot be reassigned. Spooler process for network printers default to the CS queue, but you can assign them to another one. When running in the CS queue, spooler processes compete on an almost equal footing with user processes ("almost" because they are time-sliced, but as system processes they do not decay from the base of the CS queue as user processes do). However, if you have only a few serial or network printers, you may choose to run their spoolers in the BS queue. Hewlett-Packard generally recommends that you do not specify the DS or ES queues for network printers, since the resulting spooler performance would probably be unacceptable.

SNMP_get_community_nameThe JetDirect interface card uses Simple Network Management Protocol (SNMP) services to retrieve printer status. SNMP allows you to restrict access to this retrieval service by assigning a password using the term "SNMP get community name." Most system managers allow the printer default "ALL" to remain in effect, which means that every user can access printer status. To ensure that the spooler can retrieve status information from the printer, set this item to the printer's "SNMP get community name". Note that if you set this item to anything besides ALL, you may wish to restrict read access to NPCONFIG.PUB.SYS to prevent users from reading the password. Optional.
data_timeout

The amount of time, in seconds, that the native mode spooler waits for a specific network I/O request to complete before it checks whether or not the printer and network are operating properly. This item is one of four that you may use to determine how network and/or printer problems are managed. Default is 10 seconds, but you may enter another positive integer or 0. If you enter a value of 0 for data_timeout, the three other I/O timing items (explained below) are not used. Optional.

The optimal value for data_timeout depends on the speed of the printer, the nature of the data (text, graphics, PostScript), the complexity of the network, and its normal bandwidth. For more information, read "Using I/O timing effectively" later in this chapter.

snmp_timeout

The amount of time, in seconds, that the native mode spooler waits for an SNMP request to complete before assuming that it will not do so and continuing. The default is 5 seconds. Optional.

When the data_timeout expires, the spooler issues a Simple Network Management Protocol (SNMP) request to check the status of the printer. Since the SNMP request also must use the network, a network problem can also cause the expiration of data_timeout.

snmp_max_retries

The number of times that the spooler cycles through printer status checking before consulting message_interval (the next item) to possibly display error/warning messages. The default is 3, but you may enter a positive integer or 0. A value of 0 means that such messages are never displayed.

Briefly, a single cycle works as follows: After transmitting data to the printer, the spooler waits for a period of time defined by data_timeout. If that timeout expires, the spooler issues an SNMP request to retrieve printer status, then waits a for a period of time defined by snmp_timeout. The item snmp_max_retries defines how many times the spooler executes this cycle before consulting message_interval. If the default value of 3 is used, for example, then the third snmp_timeout causes the spooler to consult message_interval.

message_interval

Specifies the minimum interval, in seconds, at which a printer status message (such as "LDEV #6, PAPER OUT") is displayed on the console or on an associated device, for as long as the message applies. Optional.

The default message_interval is 0, which displays the message once, when the condition is detected, and not thereafter. You may enter a positive integer. For example, if you enter a value of 60 for this item, the PAPER OUT message will be redisplayed no more than every 60 seconds until the paper is loaded.

banner_intray

Controls whether or not a PCL Paper Source command is sent to the printer, allowing banner pages to be taken from a separate paper tray. No default. Optional.

The spooler performs no checks on the value you enter for banner_intray except to verify that it is an integer. It is your responsibility to provide a valid positive value. Typical values are 1 (selects the upper tray) or 4 (lower tray). Consult your printer's documentation for details.

If you enter a positive integer, it is inserted into the PCL Paper Source command, Esc&l#H, replacing the "#", when a banner (header or trailer) is printed. If you omit this item, no Paper Source command is sent to the printer during banner printing, and any banner page is then taken from whichever intray was last used. If you enter a negative value or 0, the printer behaves as if the item were omitted. This allows an LDEV-specific entry to cancel a global entry.

Once selected, the banner page intray is not automatically deselected to print data, nor can the spooler detect the tray that was in use prior to the Paper Source command that selected the banner tray. If you use the banner_intray item, you should also specify a value for the next item, data_intray. Alternatively, you can include a PCL Paper Source command that selects your normal data output tray in your setup_file or in a user-specificed ENV file.

If the printer does not support multiple source tray selection, it ignores any Paper Source command sent to it. Therefore, it is safe to include this item in the configuration file for such a printer, especially if you intend to replace it soon with a printer with multiple source trays.

data_intray

When used in conjunction with the banner_intray item for a printer with multiple paper sources, the data_intray item instructs the printer to take banner pages and data pages from different intrays. No default. Optional.

The spooler performs no checks on the value you enter for data_intray except to verify that it is an integer. It is your responsibility to provide a valid positive value. Typical values are 1 (selects the upper tray) or 4 (lower tray). Consult your printer's documentation for details.

If you enter a positive integer, it is inserted into the PCL Paper Source command, Esc&l#H, replacing the "#", when a data page is printed. If you omit this item, no Paper Source command is sent to the printer before printing data, and the paper for data is then taken from whichever intray was last used. If you enter a negative value or 0, the printer behaves as if the item were omitted. This allows an LDEV-specific entry to cancel a global entry.

If the printer does not support multiple source tray selection, it ignores any Paper Source command sent to it. Therefore, it is safe to include this item in the configuration file for such a printer, especially if you intend to replace it soon with a printer with multiple source trays.

banner_headerbanner_trailer

Used to restrict banner printing to either a header or a trailer, or neither one. The default is TRUE for both items, which prints headers and trailers, but you may also set either or both to FALSE. The values are not case-sensitive. Optional.

The banner_header and banner_trailer items are only tested if Headers have been enabled for the device with MPE's HEADON command. In other words, setting either item to TRUE does not override an MPE/iX HEADOFF condition. However, setting both items to FALSE renders an MPE/iX HEADON command meaningless.

pjl_supported

Specifies whether or not the printer supports the necessary Printer Job Language (PJL) features to effect Page Level Recovery (PLR) and actual (as opposed to estimated) Page Count Logging. Enter a value of FALSE to indicate that the printer does not support the necessary PJL to do correct PLR or actual Page Count Logging. Enter TRUE to indicate that the printer does support the necessary PJL commands. (The values are not case-sensitive.) To have the spooler automatically test the printer for PJL support, omit the item. No default. Optional.

Be careful not to specify TRUE for a printer that does not support the required level of PJL. If you do, the spooler may never complete the print job (since it sends a PJL request and then waits for a corresponding reply, which it will never get from a non-PJL device). Or, if the spooler does complete the job, the output will be interspersed with PJL command text generated by the spooler.

If you do not need Page Level Recovery or actual Page Count logging on a printer that supports it, you may wish to set pjl_supported to FALSE anyway. If you set this item to TRUE or if PJL support is discovered automatically, there may be a noticeable delay between printing the header and data, or between printing the data and the trailer.

When you are configuring a LaserJet IIIsi, set the pjl_supported item to FALSE (instead of TRUE or instead of omitting the item altogether). The LaserJet IIIsi printer supports only a primitive level of PJL, not a full implementation.

jam_recovery

Specifies whether or not the printer has its own jam recovery procedure. The default, FALSE, indicates that the printer does not have its own recovery procedure and,when a jam occurs, will rely upon the spooler's. Optional.

If your printer is configured with enough memory to reprint any pages lost due to a paper jam (with no help from the host), you should set this item to TRUE. Note, however, that if you specify TRUE, and the printer does not recover from a jam on its own, data may be lost. (This is why the more conservative value (FALSE) is the default — output may be duplicated but should never be lost.)

If you adopt the default value or set jam_recovery to FALSE, you may get duplicate pages of output, especially if the printer does not support Page Level Recovery and has to restart the print job from the beginning of the file.

socket_trace

Specifies whether or not socket-level tracing is on. The default is OFF. Optional.

When this item is ON (enabled), it initiates a socket-level trace of the TCP connection. Socket-level tracing is useful when you suspect that the problem is in the bytestream of data sent to the printer as opposed to a problem that may be occuring at the TCP transport layer. (If you suspect that the problem is related to networking, using the transport_trace item, described next.)

To format the data you receive from a socket trace, use the NMDUMP utility and, when prompted, specify subsystem number 5 (sockets).

transport_trace

Specifies whether or not TCP-level tracing is on. The default is OFF. Optional.

When this item is ON (enabled), it initiates a TCP-level trace of the socket in addition to a socket-level trace of the TCP connection. Transport-level tracing is useful when you suspect problems with transport level software or, for example, if you need to identify TCP port numbers and/or connection parameters on either your local or the remote systems.

To format the data you receive from a transport trace, use the NMDUMP utility and, when prompted, specify subsystem number 3 (NetTransport).

default_page_size

If this value is 26, then the A4 page size is selected for the Banner. Default is set to 2 which is Letter.

  • default_page_size = 1 # for EXEC page size

  • default_page_size = 2 # for LETTER page size

  • default_page_size = 3 # for LEGAL page size

  • default_page_size = 26 # for DIN A4 page size

 

Making changes to NPCONFIG

The spooler process for each configured network printer reads the NPCONFIG file once, briefly, when it first starts executing. This occurs when the system first boots if the LDEV is configured as OS or "output spooled" in SYSGEN. The spooler also reads the NPCONFIG file whenever a user starts a spooler process by issuing either a SPOOLER nn;START or a STARTSPOOL nn for the printer.

You may edit the NPCONFIG file at any time. The changes will take effect on a particular LDEV the next time that the spooler process starts for that printer. The changes will have no effect on a spooler process that is already executing.

To change the network printer configuration for a spooler process that is currently running, follow these steps:

  1. Open the file NPCONFIG.PUB.SYS in the editor of your choice and modify the entry as needed.

  2. Save your changes to the file and exit the text editor.

  3. Issue the STOPSPOOL or SPOOLER <ldev>; STOP command for the LDEV whose configuration you need to modify.

  4. Issue the STARTSPOOL or SPOOLER <ldev>; START command for the LDEV.

Errors in NPCONFIG

If you enter a value in NPCONFIG that does not meet the requirements for that particular option, OUTSPTJ will replace the erroneous value with the default, and display a message about the replacement.

For example, suppose you enter a number that is not within the proper range for poll_interval, which is 1 to 2147483647. When this error is encountered, the output spooler substitutes the default value of 10 and displays a message similar to this:

   Output spooler, LDEV #19:  Check NPCONFIG.  The valid range of

   item "poll_interval" is 1 to 2147483647.

   The spooler will use the default value, 10.

   Native Mode Spooler message 9041

Or, for example, if you enter a value other than TRUE or FALSE for an NPCONFIG item that requires a binary setting, the output spooler substitutes the default value and responds with another kind of message. For example:

   Output spooler, LDEV #19:  Check NPCONFIG.  Valid values of

   item "pjl_supported" are TRUE and FALSE.

   The spooler will use the default value, FALSE.

   Native Mode Spooler message 9042

Security and the configuration files

You create the NPCONFIG.PUB.SYS with the same security matrix as a typical file in the PUB group of the SYS account. As a result, only users with SM capability or a user logged on in PUB.SYS can make changes to the file or to its security matrix. If you plan to add an ACD to the file, do so only after careful consideration of its impact.

The security matrix for files in PUB.SYS are also appropriate for any setup files specified in NPCONFIG.PUB.SYS. This matrix allows any user to read the files, but prevents the user from changing or purging them. It isn't necessary, however, to store setup files in PUB.SYS. You can place them in any group, account, or hierarchical directory since you must enter their fully-qualified file names in NPCONFIG anyway; for example, setup_file = LJPORTRT.HPENV.SYS.

Here is the standard security matrix for NPCONFIG.PUB.SYS, which is also appropriate for your setup files.

   FILE: NPCONFIG.PUB.SYS



   ACCOUNT ------  READ : ANY

                  WRITE : AC

                 APPEND : AC

                   LOCK : ANY

                EXECUTE : ANY



   GROUP --------  READ : ANY

                  WRITE : GU

                 APPEND : GU

                   LOCK : ANY

                EXECUTE : ANY

                   SAVE : GU



   FILE ---------  READ : ANY        FCODE: 0

                  WRITE : ANY      **SECURITY IS ON

                 APPEND : ANY        NO ACDS

                   LOCK : ANY

                EXECUTE : ANY
Feedback to webmaster