]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/accounting.html
Load cups into easysw/current.
[thirdparty/cups.git] / doc / help / accounting.html
1 <HTML>
2 <!-- SECTION: Getting Started -->
3 <HEAD>
4 <TITLE>Printer Accounting Basics</TITLE>
5 </HEAD>
6 <BODY>
7
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>
12
13
14 <H2 CLASS="title"><A NAME="QUOTAS">Quota Support</A></H2>
15
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>
21
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>
29
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>
33
34 <PRE CLASS="command">
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>
39 </PRE>
40
41 <P>Or, you can combine all three options on the same line.</P>
42
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>
46
47
48 <H2 CLASS="title"><A NAME="PAGELOG">Page Logging</A></H2>
49
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>
56
57
58 </BODY>
59 </HTML>