Printing Services

Printing Services

Printing to hundreds of network printers, support for multiple desktop OS platforms, accounting for jobs, and management by front-line technicians. A cross-platform, highly flexible, easy to administer printing system based on the open-source print server CUPS, the Common Unix Printing System. In combination with Samba and Netatalk, we have an extremely powerful and highly reliable printing system, built on an open-source foundation: printing for the enterprise.


Clients can print over any of several well-established protocols, and the print server in turn can process and print over even more. Additionally, the design of CUPS allows for custom printing backends to be written. I have developed several custom solutions (such as accounting backends), some of which are available on my CUPS Applications page.

CUPS is not only a spooler, but is also capable of highly complex filtering and RIP. In our environment however, most queues are "raw" queues in that print data is passed through a queue and on to the printer as-is. IPP and LPD are handled by CUPS natively, while Samba and Netatalk handle their respective protocols, spooling the data and passing it off to CUPS for processing and printing.

Queue Management

Addition and deletion of printers is handled by Samba, which is configured to support the Windows Add Printer Wizard run remotely from any Windows 2000 or higher client. The chief benefit of the APW is the ease-of-use of the windows environment in managing queues and binding them to Windows printer drivers for automatic client download.

The CUPS web and command-line interfaces can add printers with no problem, however it requires additional command-line work to tie into Samba to setup for automatic driver-download for Windows clients. I had developed an entire printer management suite in the form of a Webmin module that tied into this environment, but ran into problems with the inflexibility of the command line tools (cupsaddsmb) which were limited to a one-size fits all approach to the various Windows versions and corresponding drivers.

Instead, Samba is configured to support the APW with its addprinter and delprinter commands (some stripped-down versions of my glue scripts for this task ship with Samba as of version 3.0.11). The APW allows you the ability to install printer drivers straight from .inf files direct from vendors, or by simply selecting pre-existing ones from a dropdown list. Tying this in with addition and deletion of printers creates the whole package and makes the box indistinguishable from a Windows print server.

Finally, management of print jobs is done using the CUPS web interface, or the Windows printers interface. Both are well-suited to the task. Some portions of the aforementioned Webmin suite are also in use, but mainly for functions specific to our environment.


Accounting is accomplished on a per-queue basis by a CUPS backend accounting system I have developed (see the CUPS Applications page). CUPS allows for all kinds of custom solutions to be put into the filter chain or the backend.

There have been a series of evolutionary steps in our accounting system. The latest development includes a Perl backend called accsnmp that wraps around another backend, querying the printer's page counter over SNMP both before and after a job prints to get that job's pagecount. There is no parsing of the printer job language (PS, PCL, whatever) which means that any driver can render the job and accounting is far simpler and less prone to error.

The accounting system keeps track of the username and saves a file /var/log/cups/acc/USERNAME with their total number of printed pages. Additionally it logs to the standard CUPS page_log file. Note that the accounting backend will also work for non-raw queues, and jobs will hit the backend after going through the filter chain.


A minimal 1U, and later a VM at 2 CPUs and 2GB of RAM easily handles between 5,000 and 10,000 jobs a day (about 250,000 to 300,000 jobs per semester with an average load well below 1.00. Roughly 10 percent of these are accounted jobs (student labs), comprising around 500,000 pages a semester.

ctime: 2004-07-08