2 <!-- SECTION: Getting Started -->
4 <TITLE>Printer Accounting Basics
</TITLE>
5 <LINK REL=
"STYLESHEET" TYPE=
"text/css" HREF=
"../cups-printable.css">
9 <H1 CLASS=
"title">Printer Accounting Basics
</H1>
11 <P>CUPS supports a variety of printer accounting schemes. Aside from the
12 built-in
<A HREF=
"#QUOTAS">quota
</A> and
<A HREF=
"#PAGELOG">page logging
</A>
13 support, there are several third-party solutions that can be found on
14 <A HREF=
"http://www.cups.org/">www.cups.org
</A>.
</P>
17 <H2 CLASS=
"title"><A NAME=
"QUOTAS">Quota Support
</A></H2>
19 <P>CUPS supports page and size-based quotas for each printer.
20 The quotas are tracked individually for each user, but a single set of
21 limits applies to all users for a particular printer. For example, you
22 can limit every user to
5 pages per day on an expensive printer, but
23 you cannot limit every user except Johnny.
</P>
25 <P>The
<CODE>job-k-limit
</CODE>,
<CODE>job-page-limit
</CODE>, and
<CODE>job-quota-period
</CODE>
26 options determine whether and how quotas are enforced for a printer.
27 The
<CODE>job-quota-period
</CODE> option determines the time interval for
28 quota tracking. The interval is expressed in seconds, so a day is
29 86,
400, a week is
604,
800, and a month is
2,
592,
000 seconds. The
30 <CODE>job-k-limit
</CODE> option specifies the job size limit in killobytes. The
31 <CODE>job-page-limit
</CODE> option specifies the number of pages limit.
</P>
33 <P>For quotas to be enforced, the period and at least one of the limits
34 must be set to a non-zero value. The following options will enable
35 weekly quotas with the given size and page count limits:
</P>
38 <KBD>/usr/sbin/lpadmin -p
<I>printer
</I> -o job-quota-period=
604800 \
39 -o job-k-limit=
1024 ENTER
</KBD>
40 <KBD>/usr/sbin/lpadmin -p
<I>printer
</I> -o job-quota-period=
604800 \
41 -o job-page-limit=
100 ENTER
</KBD>
44 <P>Or, you can combine all three options on the same line.
</P>
46 <P>While there is no way to query the current quota state for a particular
47 user, any application can request a list of jobs for a user and printer that
48 can be used to easily determine that information.
</P>
51 <H2 CLASS=
"title"><A NAME=
"PAGELOG">Page Logging
</A></H2>
53 <P>CUPS logs every page that is printed on a system to the
54 <VAR><A HREF=
"ref-page_log.html">page_log
</A></VAR> file. Page logging
55 is only available for drivers that provide page accounting information,
56 typically all PostScript and CUPS raster devices. Raw queues and queues
57 using third-party solutions such as Foomatic generally do not have
58 useful page accounting information available.
</P>