[Samba] Is printcap information required if no [printers] share?

Neil Hoggarth neil.hoggarth at physiol.ox.ac.uk
Mon Apr 10 11:53:54 GMT 2006

Hi folks,

I have a print server, running SPARC Solaris 9. I've just upgraded from 
Samba 3.0.10 to 3.0.22 and immediately hit system load issues which 
appear to be related to the use of "lpstat -v" to determine the 
available print queues.

There are about 70 Unix print queues on this system. Running "lpstat -v" 
can take something like 20s of wall-clock time. lpstat itself doesn't 
use much in the way of CPU cycles during this delay, though it is 
possible that busy work is going on elsewhere (lpsched daemon?).

I got the load on the server back under control by creating an 
/etc/printcap file that just listed all the queue names, one per line, 
and pointing the global "printcap name" parameter at the file. System 
load fell back to "normal" levels very rapidly following this change, 
and the system became much more responsive.

I then started experimenting to see if I could get away without 
maintaining a separate printcap file. It happens that I don't use a 
[printers] share - each of my print shares is explicitly listed in its 
own smb.conf section, so it occured to me that Samba possibly didn't 
need to be able to enumerate the available queues at all.

I tried setting "printcap name = /dev/null".

This seems to work, based on initial testing: all the print shares still 
show up when I browse my server; I still see all the queues in my 
servers "Printers and Faxes" folder; I can still print to the queues 
successfully. However, I thought I'd post this query to double check 
that there aren't any pitfalls that I haven't discovered yet.

Does Samba make any use of the list of queues that it automatically 
determines at startup, other than for expanding the [printers] magical 

Neil Hoggarth  -------------------  Computing Manager, Sherrington Building
Department of Physiology, Anatomy and Genetics  -  University of Oxford, UK

More information about the samba mailing list