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