Previous Page
Next Page

Managing the LP Print Service

Many methods can be used to define a printer on a Solaris system. The following tools are available in Solaris 10 to set up and administer printers:

  • Solaris Print Manager A GUI that provides the ability to configure and manage printers.

  • LP print service commands The various LP commands available from the command line to configure and manage printers.

Although the GUI is an easy tool to use, the LP commands used from the command line offer more functionality. Table 22 lists the lp commands, which are the command-line means for controlling printers and print queues.

Table 22. Solaris lp Commands

Command

Description

accept/reject

Enables or disables any further requests for a printer or class entering the spooling area.

cancel

Lets the user stop the printing of information.

enable/disable

Enables or disables any more output from the spooler to the printer.

lp

The user's print command. Places information to be printed into the spooler.

lpadmin

Allows the configuration of the print service.

lpmove

Moves print requests between destinations.

lpsched

Starts the print service.

lpshut

Stops the print service.

lpstat

Displays the status of the print service.


There are three types of printer configurations that you need to understand:

  • Local printer A printer physically connected to a system and accessed from that local system.

  • Network printer A printer physically attached to the network with its own hostname and IP address. A network printer provides print services to clients, but is not directly connected to a print server.

  • Remote printer A printer that users access over the network. This printer is either physically attached to a remote system or is physically attached to the network.

A print server is a system that has a local printer connected to it and makes the printer available to other systems on the network. A print client is a remote system that can send print requests to a print server. A system becomes a print client when you install the print client software and enable access to remote printers on the system. Any networked Solaris system with a printer can be a print server, as long as the system has adequate resources to manage the printing load.

The LP Print Daemons

The /usr/lib/lpsched, also referred to as the scheduler daemon, is the Unix utility that is responsible for scheduling and printing in Solaris 10. Sometimes it is referred to as the lp daemon. The lpsched print daemon takes output from the spooling directory and sends it to the correct printer. lpsched also tracks the status of printers and filters on the print server.

The /usr/sbin/inetd daemon is started at bootup, and it listens for service requests on all the ports associated with each of the services listed in its configuration file. When inetd receives a print request, in.lpd is started to service the connection. The in.lpd daemon exits after the request has been serviced.

The Solaris LP print service performs the following functions:

  • Initialization Initializes a printer prior to sending it a print request to ensure that the printer is in a known state.

  • Queuing Schedules the print requests that are waiting to be sent to the printer.

  • Tracking Tracks the status of every print request. It enables the system administrator to manage all of the requests and allows users to view or cancel their own requests. It also logs errors that may have occurred during the printing process.

  • Fault notification This function prints the error message on the console or sends the message via email to the user.

  • Filtering Converts the print jobs to the appropriate type of file for the destination printer.

Most of the lp configuration files are located in the /var/spool/lp directory, except for the interface files, which are located in the /etc/lp/interfaces directory. A SCHEDLOCK file should be in /var/spool/lp; it is responsible for ensuring that only one instance of lpsched runs. You use the lpadmin command to add, configure, and delete printers from the system.

You can put several locally attached printers into a group called a printer class. When you have set up a printer class, users can then specify the class (rather than individual printers) as the destination for a print request. The first printer in the class that is free to print is used. You create printer classes with the lpadmin command as follows:

lpadmin -p <printer-name> -c <printer-class>


Previous Page
Next Page