[cups.general] scripting cups configuration?

Brian Kroth bpkroth at gmail.com
Fri Aug 20 15:20:18 PDT 2010


Hello all,

Here's my basic question:

I'm wondering if anyone has any experience with scripting CUPS queue
configurations and/or distributing them via cfengine that they'd like to
share?


In more depth:

We have a central print server that we force all print jobs to go
through in order to do some page accounting using tea4cups, pkpgcounter,
and SNMP::NPAdmin.

I've tried having the couple hundred Linux clients simply ask the server
over IPP for their list of queues and then send jobs that way.  It
works, but with some performance problems.

The issue is that then the print server runs all the jobs through all of
the filters defined by the PPD associated with the queue which results
in a high load, slow printing, etc.

For Windows clients I simply have them print through cups-lpd with -o
document-format=application/vnd.cups-raw so that it just takes the PS
they gave us, we run our accounting scripts on it (fairly low overhead),
and we're done.  Someone else manages the drivers for them :)

I would like to have the Linux clients do the same thing, but that means
configuring the ~50 queues and their PPDs on each of the machines, so I
want a nice scripted system.

I was hoping that I could run a script to generate the configs and then
send them down via cfengine to all the clients, but the issue is that
CUPS updates the printers.conf, classes.conf files every so often with
state data so a simple copy the file down won't work.

Googling around hasn't turned up much more than lpadmin.  Any thoughts,
insight, experience you have to share would be helpful.

Also, since some of our helpdesk people thought the CUPS pages were too
cumbersome I just finished writing a set of PHP wrapper pages for
displaying CUPS queue data along with SNMP data from printers via AJAX
using a combination of Perl's SNMP::NPAdmin [1] and PHP PrintIPP [2].
Let me know if you're interested and I'll see if I can clean them up a
bit for sharing.

Thanks,
Brian

[1] http://search.cpan.org/~bozzio/SNMP-NPAdmin-1.0/NPAdmin.pm
[2] http://www.nongnu.org/phpprintipp/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://lists.cups.org/pipermail/cups/attachments/20100820/2da6bdc0/attachment.bin>


More information about the cups mailing list