MLPD

Section: Maintenance Commands (8)
Updated: 8 November 1990
Index Return to Main Contents
 

NAME

mlpd - multiple line printer daemon  

SYNOPSIS

mlpd [ -p <base pr> <pr1> <pr2> ... ] [ -t <timeout> ]  

DESCRIPTION

mlpd is a multiple line printer daemon, which is set up in your rc.local (read the manual on rc (8)) script, which will monitor files being printed on your system. mlpd will look in the base printer directory for files, try to find jobs that need to be printed, and take those jobs and move them to any available printers. Printer jobs no longer have to wait for a larger job in front of them. This allows for optimization in printing files to any number of printers.

 

OPTIONS

 

-p <base pr> <pr1> <pr2> ...

Specifies the printers to print on. For example, if lp is the normal line printer to queue to, and the real printers are connected lp1 and lp2, then I would specify -p lp lp1 lp2 as my print options. The super-user can specify any number of printers from the command line. The program will look up these printers in /etc/printcap entry to verify their existance, and use their spooling directories as the directories to queue in. If the printers are not in /etc/printcap, or the proper spooling directories do not exist, then the program will exit and log all information to syslog().

 

-t <timeout>

Specifies the amount of time to wait before checking the base printer queue. Normally this time is set to 2 seconds, but the user can specify what they wish. It is normally suggested to let the default remain intact, as the program will run better under this environment.  

OPERATION

 

Operation/Syntax of Program

The program runs by first trying to check all of the command line arguments, and setting all of the proper printing options. Once it knows where each printer queueing directory is, it then goes out and starts into a loop, where is calls select() for a period of seconds equal to that specified on the command line, or a default of 2 seconds. After the timeout has occurred, the daemon will go out and look for jobs in the base printer queue. If it finds any jobs, it will then check to see if any of the printers specified are available for printing. If one of the printers is free to print, it will send that printer the print job first available. It will continue to do this until either there are no more jobs in the printer queue, or all of the printers are busy. Every 30 seconds, the printers are restarted again, in case any printer files become jammed for some reason. Should the super-user want to kill off the program, there will be a lock file in /etc with the name "mlpd.<base pr>.pid", which will contain the PID of the daemon running.

 

SEE ALSO

lpq(1), lpr(1), lprm(1), hosts(5), hosts.equiv(5), printcap(5), lpc(8), pac(8)  

BUGS

The program can only allow for 512 printers. If you can edit the code, you can raise this amount, but I really didn't imagine someone trying to watch over more than 512 printers.

If you start up mlpd before starting up lpd in rc.local, the program will exit, because it was not able to connect to the lpd device.

The timeout value is set to 2 seconds, so if this begins to slow your system down, increase this value. I would not suggest lowering it.

If you find something else wrong with it, please let me know. I'm ever willing to fix anything wrong with it, add new functionality, and so forth. Contact yakker@ucrmath.ucr.edu for any other information, bug reports, etc.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
-p <base pr> <pr1> <pr2> ...
-t <timeout>
OPERATION
Operation/Syntax of Program
SEE ALSO
BUGS

This document was created by man2html, using the manual pages.
Time: 06:35:48 GMT, December 12, 2024