1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 3<html> 4 <head> 5 <meta name="generator" content="HTML Tidy, see www.w3.org"> 6 <title>Accounting File</title> 7 <meta name="GENERATOR" content= 8 "Modular DocBook HTML Stylesheet Version 1.7"> 9 <link rel="HOME" title=" LPRng Reference Manual" href= 10 "index.htm"> 11 <link rel="UP" title="Accounting " href="accountingref.htm"> 12 <link rel="PREVIOUS" title="Accounting Information" href= 13 "x9682.htm"> 14 <link rel="NEXT" title="Authorization and Quotas" href= 15 "x9736.htm"> 16 </head> 17 18 <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link= 19 "#0000FF" vlink="#840084" alink="#0000FF"> 20 <div class="NAVHEADER"> 21 <table summary="Header navigation table" width="100%" border= 22 "0" cellpadding="0" cellspacing="0"> 23 <tr> 24 <th colspan="3" align="center">LPRng Reference Manual: 5 25 Sep 2003 (For LPRng-3.8.22)</th> 26 </tr> 27 28 <tr> 29 <td width="10%" align="left" valign="bottom"><a href= 30 "x9682.htm" accesskey="P">Prev</a></td> 31 32 <td width="80%" align="center" valign="bottom">Chapter 33 18. Accounting</td> 34 35 <td width="10%" align="right" valign="bottom"><a href= 36 "x9736.htm" accesskey="N">Next</a></td> 37 </tr> 38 </table> 39 <hr align="LEFT" width="100%"> 40 </div> 41 42 <div class="SECT1"> 43 <h1 class="SECT1"><a name="AEN9696">18.3. Accounting 44 File</a></h1> 45 46 <p>The Accounting File (<var class="LITERAL">:af=</var>) 47 option value specifies the destination of accounting 48 information. If the format of the <var class= 49 "LITERAL">:af</var> option is <var class="LITERAL">:as=| 50 ...</var> , then the value is assumed to be a program to be 51 run to record start and end of job information. The program 52 is run in the same manner as a print filter. The values of 53 the <var class="LITERAL">:as</var> and <var class= 54 "LITERAL">:ae</var> options are written to the program's <var 55 class="LITERAL">STDIN</var> and the output from the program's 56 <var class="LITERAL">STDOUT</var> is used as described below 57 for authorization.</p> 58 59 <p>If the <var class="LITERAL">:af=</var> option has the 60 format <var class="LITERAL">host%port</var> then a TCP/IP 61 connection is opened to the specified port on the indicated 62 host. The values of the <var class="LITERAL">:as</var> and 63 <var class="LITERAL">:ae</var> options are written to the 64 remote host. The port that the connection originates from 65 will be in the range set by the configuration or printcap 66 <span class="emphasis"><i class="EMPHASIS"><a href= 67 "rfc1179ref.htm#LPDPORT">originate_port</a></i></span> 68 option.</p> 69 70 <p>Finally, if the <var class="LITERAL">:af=</var> has 71 neither of these formats then it will be treated as a 72 pathname to a file. If the file exists or the <var class= 73 "LITERAL">create_files</var> option is true, then the file 74 will be opened and the values of the <var class= 75 "LITERAL">:as</var> and <var class="LITERAL">:ae</var> 76 options are written to the file. The accounting file should 77 be periodically truncated. </p> 78 79 <p> By convention the <var class="LITERAL">:af=</var> 80 value is passed to filters as a command line option. LPRng 81 will pass the option value only if it is specifies a file or 82 network destination. This implies that accounting information 83 can be written to the accounting file or network destinations 84 by the print spooler, <var class="LITERAL">:of</var> filters, 85 or print file filters. The filters are responsible for 86 opening the accounting file or network connection.</p> 87 88 <p>The following is an example of information written to the 89 accounting file:</p> 90 91 <div class="INFORMALEXAMPLE"> 92 <a name="AEN9722"></a> 93<pre class="SCREEN"> 94 jobstart '-Hh4.private' '-nroot' '-Pps' '-kcfA938h4.private' \ 95 '-b1093' '-tNov 5 19:39:25' 96 start '-p12942' '-kcfA938h4.private' '-nroot' '-hh4.private' '-Pps' \ 97 '-c0' '-Fo' '-tSun Nov 5 19:39:25 1995' 98 filestart '-p12944' '-kcfA938h4.private' '-nroot' '-hh4.private' '-Pps' \ 99 '-c0' '-Ff' '-tSun Nov 5 19:39:27 1995' 100 fileend '-p12944' '-kcfA938h4.private' '-nroot' '-hh4.private' '-Pps' \ 101 '-b3' '-c0' '-Ff' '-tSun Nov 5 19:39:58 1995' 102 end '-p12942' '-kcfA938h4.private' '-nroot' '-hh4.private' '-Pps' \ 103 '-b2' '-c0' '-Fo' '-tSun Nov 5 19:39:59 1995' 104 jobend '-Hh4.private' '-nroot' '-Pps' '-kcfA938h4.private' \ 105 '-b1093' '-tNov 5 19:39:59' 106</pre> 107 </div> 108 <br> 109 <br> 110 111 <p>The <var class="LITERAL">jobstart</var> and <var class= 112 "LITERAL">jobend</var> lines are written by <b class= 113 "APPLICATION">lpd</b> and are the expanded <var class= 114 "LITERAL">:as</var> and <var class="LITERAL">:ae</var> 115 values. The <var class="LITERAL">start</var> and <var class= 116 "LITERAL">end</var> line are added by the <var class= 117 "LITERAL">:of</var> filter. This filter usually queries the 118 printer and gets printer dependent accounting information 119 such as the pagecounter value. The <var class= 120 "LITERAL">:of</var> filter is then suspended and the job is 121 processed by the various format dependent filters. The the 122 <var class="LITERAL">filestart</var> and <var class= 123 "LITERAL">fileend</var> lines are produced by the other 124 filters.</p> 125 </div> 126 127 <div class="NAVFOOTER"> 128 <hr align="LEFT" width="100%"> 129 130 <table summary="Footer navigation table" width="100%" border= 131 "0" cellpadding="0" cellspacing="0"> 132 <tr> 133 <td width="33%" align="left" valign="top"><a href= 134 "x9682.htm" accesskey="P">Prev</a></td> 135 136 <td width="34%" align="center" valign="top"><a href= 137 "index.htm" accesskey="H">Home</a></td> 138 139 <td width="33%" align="right" valign="top"><a href= 140 "x9736.htm" accesskey="N">Next</a></td> 141 </tr> 142 143 <tr> 144 <td width="33%" align="left" valign="top">Accounting 145 Information</td> 146 147 <td width="34%" align="center" valign="top"><a href= 148 "accountingref.htm" accesskey="U">Up</a></td> 149 150 <td width="33%" align="right" valign="top">Authorization 151 and Quotas</td> 152 </tr> 153 </table> 154 </div> 155 </body> 156</html> 157 158