[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 3


lpsystem Command

Note: This is a System V Print Subsystem command.

Purpose

Registers remote systems with the print service.

Syntax

lpsystem [ -T Timeout ] [ -R Retry ] [ -y Comment ] SystemName [ SystemName . . . ]

lpsystem -l [ SystemName . . . ]

lpsystem -r SystemName [SystemName . . . ]

lpsystem -A

Description

The lpsystem command defines parameters for the LP print service, with respect to communication (via a high-speed network such as TCP/IP) with remote systems.

Specifically, the lpsystem command defines remote systems with which the local LP print service can exchange print requests. These remote systems are described to the local LP print service in terms of several parameters that control communication: type, retry, and timeout. These parameters are defined in /etc/lp/Systems. You can edit this file with a text editor (such as vi), but editing is not recommended. By using lpsystem, you can ensure that lpsched is notified of any changes to the Systems file.

The Timeout parameter specifies the length of time (in minutes) that the print service should allow a network connection to be idle. If the connection to the remote system is idle (that is, there is no network traffic) for N minutes, then drop the connection. (When there is more work, the connection is re-established.) Legal values are n, 0, and N, where N is an integer greater than 0. If a decimal number is used for N, it is truncated to the whole number. The value n means never time out; 0 means as soon as the connection is idle, drop it. The default is n.

The Retry parameter specifies the length of time (in minutes) to wait before trying to re-establish a connection to the remote system, when the connection was dropped abnormally (that is, a network error). Legal values are n, 0, and N, where N is an integer greater than 0. It means wait N minutes before trying to reconnect. If a decimal number is used for N, it is truncated to the whole number. (The default is 10 minutes.) The value n means do not retry dropped connections until there is more work; 0 means try to reconnect immediately.

The Comment parameter allows you to associate a free form comment with the system entry. This is visible when lpsystem -l is used.

The SystemName is the name of the remote system from which you want to be able to receive jobs and to which you want to be able to send jobs. A special entry is provided with the /etc/lp/Systems file by default, which allows all connections to bsd systems. That entry uses the asterisk (*) as the SystemName.

The command lpsystem -l [ SystemName ] prints out a description of the parameters associated with SystemName (if a system has been specified) or with all the systems in its database (if SystemName has not been specified).

The command lpsystem -r SystemName removes the entry associated with SystemName. The print service no longer accepts jobs from that system or send jobs to it, even if the remote printer is still defined on the local system. The scheduler must be running when the removal of a systems file entry occurs, because the scheduler checks whether the system entry is currently used by a printer destination. If currently used, the system entry cannot be removed.

If you use lpsystem -r SystemName to remove a system and you have active printers for that system, you will not be allowed to remove the system from the system file. lpsystem -r SystemName only works if no printers for that system exist.

With respect to the semantics of the Timeout and Retry values, the print service uses one process for each remote system with which it communicates, and it communicates with a remote system only when there is work to be done on that system or work is being sent from that system.

The system initiating the connection is the master process, and the system accepting the connection is the secondary process. This designation serves only to determine which process dies (the secondary) when a connection is dropped. This helps prevent more than one process communicating with a remote system. All connections are bi-directional, regardless of the master/secondary designation. You cannot control a system's master/secondary designation. Typically, a client machine has the master child, and the server machine has the secondary child. If a master process times out, then both the secondary and master exit. If a secondary process times out, then it is possible that the master may still live and retry the connection after the retry interval. Therefore, one system's resource management strategy can affect another system's strategy.

All forms of the lpsystem command accept * (asterisk enclosed in double quotes) for SystemName.

Depending upon the configuration of the name server, you may need to change the entry in the SystemName field in /etc/lp/Systems to a full domain name.

Flags


-A Prints out the TCP/IP address in a format.
-l [ SystemName ] Prints out a description of the parameters associated with SystemName or with all the systems in its database.
-r SystemName Removes the entry associated with SystemName.
-R Retry Specifies time to wait before trying to reestablish a connection for a remote system.
-T Timeout Specifies the time allowed for a network connection to be idle. Timeout is in minutes. Default is to never time out.
-y Comment The Comment parameter allows you to associate a free-form comment with the system entry.

Security

Only a user with appropriate privileges may execute the lpsystem command.

Files


/etc/lp/*
/var/spool/lp/*

Related Information

The lpsched command.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]