Jump to Navigation

252 - CUPS Spool Management

You have the spool directory of your Linux print subsystem.

For CUPS it is normally "/var/spool/cups/", as set by the cupsd.conf  directive "RequestRoot /var/spool/cups".

After printing, the job History & job file reside in /var/spool/cups. If you do not need them, you could clear them to make a room for CUPS.
So there are some parameters on CUPS to contorol them.

1. Print Job Files

The scheduler stores job files in a spool directory, typically /var/spool/cups.
Two types of files will be found in the spool directory: control files starting with the letter "c" ("c00001", "c99999", "c100000", etc.)
and data files starting with the letter "d" ("d00001-001", "d99999-001", "d100000-001", etc.) Control files are IPP messages based on
the original IPP Print-Job or Create-Job messages, while data files are the original print files that were submitted for printing.
There is one control file for every job known to the system and 0 or more data files for each job.

Control files are normally cleaned out after the 500th job is submitted, while data files are removed immediately after a job has successfully printed.
Both behaviors can be configured.

2. Add the parameterrs in /etc/cups/cupsd.conf.

* PreserveJobHistory On

The PreserveJobHistory directive controls whether the history of completed, canceled,
or aborted print jobs is stored on disk. A value of On (the default) preserves job information until the administrator purges it
with the cancel command. A value of Off removes the job information as soon as each job is completed, canceled, or aborted.

* PreserveJobFiles On
The PreserveJobFiles directive controls whether the document files of completed, canceled, or aborted print jobs are stored on disk.
A value of On preserves job files until the administrator purges them with the cancel command. Jobs can be restarted (and reprinted)
as desired until they are purged. A value of Off (the default) removes the job files as soon as each job is completed,
canceled, or aborted.

* "MaxJobs 500"
The MaxJobs directive controls the maximum number of jobs that are kept in memory.
Once the number of jobs reaches the limit, the oldest completed job is automatically purged from the system to make room for the new one.
If all of the known jobs are still pending or active then the new job will be rejected.

Setting the maximum size to 0 disables this functionality. The default setting is 500.

3. Purge histories & job files.

This command will delete the old files over 10 days old

# /usr/sbin/tmpwatch -md 240 /var/spool/cups

 

 

 



Main menu 2

Story | by Dr. Radut