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