[ Team LiB ] |
![]() ![]() |
Introducing the LP Print ServiceThe LP print service is a set of software commands that enable users to print files while they continue to work. The print service consists of the LP print service software and spooler—spool is an acronym for system peripheral operation off-line. The LP print service performs the following functions.
Administering Files and Scheduling Print RequestsThe LP print service has a scheduler daemon, called lpsched. The scheduler daemon updates the LP system files with information about printer setup and configuration, as shown in Figure 23. Figure 23. The lpsched Scheduler Updates the LP System Files
Starting with the Solaris 2.6 release, all the LP commands except for enable and disable have been moved from /usr/bin into /usr/sbin. The enable and disable commands are located in /usr/bin and /usr/lib/lp/local and are symbolically linked to the accept and reject commands. The lpsched daemon also schedules all local print requests, as shown in Figure 24, regardless of whether the requests are issued by users from an application or from the command line. In addition, the scheduler tracks the status of printers and filters. When a printer finishes printing a request, the scheduler schedules the next request if one is in the queue. Figure 24. The lpsched Scheduler Schedules Local Print Requests
Scheduling Network Print RequestsStarting with the Solaris 2.6 release, the lpNet daemon does not schedule network requests. Instead, network scheduling is handled by the inetd Internet services daemon. The inetd daemon listens for a request and starts in.lpd. Then, in.lpd looks at the request and loads bsd_lpsched.so. in.lpd passes the request through bsd_lpsched.so to lpsched for local printing. Filtering Print FilesPrint filters are programs that convert the content of a file from one format to another so that it can be printed. In network printing, print filters process the file on the print client before it gets transmitted to the server. The LP print service uses filters to perform the following tasks.
Not every print filter can perform all these tasks. However, because each task is printer-specific, it can be implemented separately. A print filter can be as simple or as complex as needed. The Solaris Operating Environment provides print filters in the /usr/lib/lp/postscript directory to cover most PostScript printing situations in which the destination printer requires the data to be in PostScript format. You have to create and add filters to the system for non-PostScript printers. Starting the Printer Interface ProgramThe LP print service uses a standard printer interface program to interact with other parts of the operating system to perform the following tasks.
The LP print service uses the standard interface program (found in the /usr/lib/lp/model directory) unless you specify a different one. You can create custom interface programs, but you must be careful that the custom program does not terminate the connection to the printer or interfere with proper printer initialization. Tracking the Status of Print JobsThe lpsched daemons on the print server each keep a log of every print request that is processed and note any errors that occurred during the printing process. This log is kept in the /var/lp/logs/lpsched file. Every night, the lp cron job renames /var/lp/logs/lpsched to a new file lpsched .n and starts a new log file. If errors occur or jobs disappear from the print queue, you can use the log files to determine what lpsched has done with a print job. The following example shows the end of the /var/lp/logs/lpsched file.
# tail /varl/lp/logs/lpsched
06/01 14:51:50: Print services started.
06/01 16:52:27: Print services stopped.
06/02 15:43:44: build info: 01/08/00:18:06:11
06/02 15:43:44: Print services started.
06/02 17:04:25: Print services stopped.
06/04 10:34:00: build info: 01/08/00:18:06:11
06/04 10:34:00: Print services started.
06/04 16:53:05: Print services stopped.
06/05 09:34:59: build info: 01/08/00:18:06:11
06/05 09:34:59: Print services started.
#
Tracking FormsThe LP print service helps you track which forms are mounted on each printer and notifies you when it cannot find the description of how to print on a form. You are responsible for creating form descriptions and mounting and unmounting the paper form in each printer, either as part of setting up a printer or in response to alerts from the LP print service. Users can specify the form on which they want a job to print. You (root) can mount a specific form and then tell the LP print service that the form is available and on which printer it is mounted. Alternatively, users can submit print requests specifying a particular form and requesting that the form be mounted. When the LP print service receives the request, it sends an alert message to the system administrator (root) requesting that the form be mounted. Tracking Print WheelsThe procedure for tracking print wheels is similar to the procedure for tracking forms. Some printers (usually letter-quality printers) have removable print heads, such as daisy wheels or print balls, that provide a particular font or character set. A user can request a named character set. If that character set is not available, the LP print service notifies the system administrator (root) of the request. The job is stored in the print queue until the print wheel is changed. Receiving Printing Problem AlertsThe LP print service performs sophisticated error checking. If a printing problem occurs, alerts are sent to the originator of a print request or to the system administrator, depending on the nature of the problem and what is required to fix it. Users are notified when a print request cannot be completed. Users can request notification by e-mail when a job is successfully completed. Administrators are alerted to problems with printers and to requests for filters, forms, or character sets. For problems that require an administrator's attention, the LP print service default is to write an alert message to the system administrator's console window (that is, to the terminal on which root is logged in). As the system administrator, you can change the policy to receive alert messages by e-mail or a program of your choice. Or, you can choose to receive no alerts when printing problems occur. |
[ Team LiB ] |
![]() ![]() |