Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [437]

By Root 2838 0
banners, respectively. Each accepts command-line arguments that specify the banner name, login name, and job title.

LPRng comes with one particularly useful filter, ifhp, which prints to a tremendous variety of printers. Although it was designed primarily to support HP printers, it can handle most printers out of the box. Printers that are not supported internally can usually be made to work without too much hassle.

Accounting


In the days of line printers, accounting was a simple task. You could get an accurate page count for any job simply by counting lines. However, this method fails completely on PostScript and other types of files.

The only accurate way to account for the number of pages used for a job is to actually count those pages as they leave the printer. Fortunately, many modern printers keep a counter of the number of pages they have printed over their lifetime. By checking this counter before and after a print job, the printer driver can determine the true page count.

One method for implementing this concept is actually included with LPRng. The script is located in the LPRng distribution at ./UTILS/accounting.pl. Read the comments at the beginning of this script for an idea of how to call it correctly from the printcap file.

23.7 DEBUGGING PRINTING PROBLEMS


Network lpd print jobs are delivered on TCP port 515. Unless you want to be printing jobs for strangers, your firewall should block all traffic to this port from the Internet. To test your connectivity to a remote lpd server, telnet from the client to port 515 of the server. If you can establish a connection, you can at least verify that the network is working and that lpd is running on the server.

If you have problems debugging a remote printer connection, you need to look in six (yes, six) places to track down the problem:

• The system log file (as specified in /etc/syslog.conf) on the machine hosting the printer, for messages about permission problems

• The system log files on the sending machine, for name resolution and permission problems

• The print daemon log file on the printing machine, for messages about bad device names, incorrect formats, etc. (as specified in /etc/syslog.conf for the lpr syslog facility)

• The print daemon log file on the sending machine, for missing filters, unknown printers, missing directories, etc.

• The printer log file on the printing machine, for errors in transmitting the job (as specified by the lf variable in the /etc/printcap file)

• The printer log file on the sending machine, for errors about preprocessing or queuing the job

When debugging remote printers, always keep in mind that there must be a queue for the job on the requesting machine, a way to decide where to send the job, and a method of sending the job to the remote machine. On the printing machine, there must be a place to queue the job, sufficient permissions to allow the job to be printed, and a way to output to the device.

Before you start tracking down a network printing problem, make sure you can print from the machine that actually hosts the printer. You may not have a network problem at all.

23.8 COMMON PRINTING SOFTWARE


Although BSD and System V both provide adequate systems for queuing, monitoring, and outputting print jobs, neither of them provides much of the format translation necessary to drive modern printers. Most vendors have at least one set of tools that sits on top of the printing system to provide these features. Sometimes these tools are included in the OS, but more often they are extra-cost add-ons. Third-party and freely distributed packages are also in wide use.

Our purpose in this section is not to tell you everything you need to know about these packages but just to let you know about the functionality they advertise.

rlpr


If you’re not willing to take the leap to LPRng but would still like a better way to print to remote printers, then rlpr is probably for you. This free package contains replacements for the BSD client commands (lpr, lpq, and lprm). The replacements are

Return Main Page Previous Page Next Page

®Online Book Reader