]>
Commit | Line | Data |
---|---|---|
1 | <!DOCTYPE html> | |
2 | <html> | |
3 | <head> | |
4 | <meta name="creator" content="mantohtml v2.0.2"> | |
5 | <title>cupsd-logs(5)</title> | |
6 | </head> | |
7 | <body> | |
8 | <h1 id="cupsd-logs-5">cupsd-logs(5)</h1> | |
9 | <h2 id="cupsd-logs-5.name">Name</h2> | |
10 | <p>cupsd-logs - cupsd log files (access_log, error_log, and page_log) | |
11 | </p> | |
12 | <h2 id="cupsd-logs-5.description">Description</h2> | |
13 | <a href="cupsd.html"><p><strong>cupsd</strong>(8)</a> | |
14 | ||
15 | normally maintains three log files: <em>access_log</em> to track requests that are submitted to the scheduler, <em>error_log</em> to track progress and errors, and <em>page_log</em> to track pages that are printed. | |
16 | Configuration directives in | |
17 | <a href="cupsd.conf.html"><strong>cupsd.conf</strong>(5)</a> | |
18 | ||
19 | and | |
20 | <a href="cups-files.conf.html"><strong>cups-files.conf</strong>(5)</a> | |
21 | ||
22 | control what information is logged and where it is stored. | |
23 | </p> | |
24 | <h3 id="cupsd-logs-5.description.access-log-file-format">Access Log File Format</h3> | |
25 | <p>The <em>access_log</em> file lists each HTTP resource that is accessed by a web browser or client. | |
26 | Each line is in an extended version of the so-called "Common Log Format" used by many web servers and web reporting tools: | |
27 | </p> | |
28 | <pre> | |
29 | <em>host group user date-time </em>"<em>method resource version</em>" <em>status bytes | |
30 | ipp-operation ipp-status</em> | |
31 | ||
32 | </pre> | |
33 | <p>For example: | |
34 | </p> | |
35 | <pre> | |
36 | 10.0.1.2 - - [01/Dec/2005:21:50:28 +0000] "POST / HTTP/1.1" 200 317 | |
37 | CUPS-Get-Printers successful-ok-ignored-or-substituted-attributes | |
38 | localhost - - [01/Dec/2005:21:50:32 +0000] "GET /admin HTTP/1.1" | |
39 | 200 0 - - | |
40 | localhost - - [01/Dec/2005:21:50:32 +0000] "POST / HTTP/1.1" | |
41 | 200 157 CUPS-Get-Printers | |
42 | successful-ok-ignored-or-substituted-attributes | |
43 | localhost - - [01/Dec/2005:21:50:32 +0000] "POST / HTTP/1.1" | |
44 | 200 1411 CUPS-Get-Devices - | |
45 | localhost - - [01/Dec/2005:21:50:32 +0000] "GET /admin HTTP/1.1" | |
46 | 200 6667 - - | |
47 | ||
48 | </pre> | |
49 | <p>The <em>host</em> field will normally only be an IP address unless you have enabled the HostNameLookups directive in the <em>cupsd.conf</em> file or if the IP address corresponds to your local machine. | |
50 | </p> | |
51 | <p>The <em>group</em> field always contains "-". | |
52 | </p> | |
53 | <p>The <em>user</em> field is the authenticated username of the requesting user. | |
54 | If no username and password is supplied for the request then this field contains "-". | |
55 | </p> | |
56 | <p>The <em>date-time</em> field is the date and time of the request in local time and is in the format "[DD/MON/YYYY:HH:MM:SS +ZZZZ]". | |
57 | </p> | |
58 | <p>The <em>method</em> field is the HTTP method used: "GET", "HEAD", "OPTIONS", "POST", or "PUT". | |
59 | "GET" requests are used to get files from the server, both for the web interface and to get configuration and log files. | |
60 | "HEAD" requests are used to get information about a resource prior to a "GET". | |
61 | "OPTIONS" requests are used to upgrade connections to TLS encryption. | |
62 | "POST" requests are used for web interface forms and IPP requests. | |
63 | "PUT" requests are used to upload configuration files. | |
64 | </p> | |
65 | <p>The <em>resource</em> field is the filename of the requested resource. | |
66 | </p> | |
67 | <p>The <em>version</em> field is the HTTP specification version used by the client. | |
68 | For CUPS clients this will always be "HTTP/1.1". | |
69 | </p> | |
70 | <p>The <em>status</em> field contains the HTTP result status of the request, as follows: | |
71 | <div style="margin-left: 2.5em;"> | |
72 | </p> | |
73 | <p style="margin-left: 2.5em; text-indent: -2.5em;">200<br> | |
74 | Successful operation. | |
75 | </p> | |
76 | <p style="margin-left: 2.5em; text-indent: -2.5em;">201<br> | |
77 | File created/modified successfully. | |
78 | </p> | |
79 | <p style="margin-left: 2.5em; text-indent: -2.5em;">304<br> | |
80 | The requested file has not changed. | |
81 | </p> | |
82 | <p style="margin-left: 2.5em; text-indent: -2.5em;">400<br> | |
83 | Bad HTTP request; typically this means that you have a malicious program trying to access your server. | |
84 | </p> | |
85 | <p style="margin-left: 2.5em; text-indent: -2.5em;">401<br> | |
86 | Unauthorized, authentication (username + password) is required. | |
87 | </p> | |
88 | <p style="margin-left: 2.5em; text-indent: -2.5em;">403<br> | |
89 | Access is forbidden; typically this means that a client tried to access a file or resource they do not have permission to access. | |
90 | </p> | |
91 | <p style="margin-left: 2.5em; text-indent: -2.5em;">404<br> | |
92 | The file or resource does not exist. | |
93 | </p> | |
94 | <p style="margin-left: 2.5em; text-indent: -2.5em;">405<br> | |
95 | URL access method is not allowed; typically this means you have a web browser using your server as a proxy. | |
96 | </p> | |
97 | <p style="margin-left: 2.5em; text-indent: -2.5em;">413<br> | |
98 | Request too large; typically this means that a client tried to print a file larger than the MaxRequestSize allows. | |
99 | </p> | |
100 | <p style="margin-left: 2.5em; text-indent: -2.5em;">426<br> | |
101 | Upgrading to TLS-encrypted connection. | |
102 | </p> | |
103 | <p style="margin-left: 2.5em; text-indent: -2.5em;">500<br> | |
104 | Server error; typically this happens when the server is unable to open/create a file - consult the error_log file for details. | |
105 | </p> | |
106 | <p style="margin-left: 2.5em; text-indent: -2.5em;">501<br> | |
107 | The client requested encryption but encryption support is not enabled/compiled in. | |
108 | </p> | |
109 | <p style="margin-left: 2.5em; text-indent: -2.5em;">505<br> | |
110 | HTTP version number not supported; typically this means that you have a malicious program trying to access your server. | |
111 | </div> | |
112 | </p> | |
113 | <p>The <em>bytes</em> field contains the number of bytes in the request. | |
114 | For POST requests the bytes field contains the number of bytes of non-IPP data that is received from the client. | |
115 | </p> | |
116 | <p>The <em>ipp-operation</em> field contains either "-" for non-IPP requests or the IPP operation name for POST requests containing an IPP request. | |
117 | </p> | |
118 | <p>The <em>ipp-status</em> field contains either "-" for non-IPP requests or the IPP status code name for POST requests containing an IPP response. | |
119 | </p> | |
120 | <h3 id="cupsd-logs-5.description.error-log-file-format">Error Log File Format</h3> | |
121 | <p>The <em>error_log</em> file lists messages from the scheduler - errors, warnings, etc. The LogLevel directive in the | |
122 | <a href="cupsd.conf.html"><strong>cupsd.conf</strong>(5)</a> | |
123 | ||
124 | file controls which messages are logged: | |
125 | </p> | |
126 | <pre> | |
127 | level date-time message | |
128 | ||
129 | </pre> | |
130 | <p>For example: | |
131 | </p> | |
132 | <pre> | |
133 | I [20/May/1999:19:18:28 +0000] [Job 1] Queued on 'DeskJet' by 'mike'. | |
134 | D [20/May/1999:19:18:28 +0000] [Job 1] argv[0]="DeskJet" | |
135 | D [20/May/1999:19:18:28 +0000] [Job 1] argv[1]="1" | |
136 | D [20/May/1999:19:18:28 +0000] [Job 1] argv[2]="mike" | |
137 | D [20/May/1999:19:18:28 +0000] [Job 1] argv[3]="myjob" | |
138 | D [20/May/1999:19:18:28 +0000] [Job 1] argv[4]="1" | |
139 | D [20/May/1999:19:18:28 +0000] [Job 1] argv[5]="media= | |
140 | na_letter_8.5x11in sides=one-sided" | |
141 | D [20/May/1999:19:18:28 +0000] [Job 1] argv[6]="/var/spool/cups/ | |
142 | d000001-001" | |
143 | I [20/May/1999:19:21:02 +0000] [Job 2] Queued on 'DeskJet' by 'mike'. | |
144 | I [20/May/1999:19:22:24 +0000] [Job 2] Canceled by 'mike'. | |
145 | ||
146 | </pre> | |
147 | <p>The <em>level</em> field contains the type of message: | |
148 | </p> | |
149 | <p style="margin-left: 2.5em; text-indent: -2.5em;">A<br> | |
150 | Alert message (LogLevel alert) | |
151 | </p> | |
152 | <p style="margin-left: 2.5em; text-indent: -2.5em;">C<br> | |
153 | Critical error message (LogLevel crit) | |
154 | </p> | |
155 | <p style="margin-left: 2.5em; text-indent: -2.5em;">D<br> | |
156 | Debugging message (LogLevel debug) | |
157 | </p> | |
158 | <p style="margin-left: 2.5em; text-indent: -2.5em;">d<br> | |
159 | Detailed debugging message (LogLevel debug2) | |
160 | </p> | |
161 | <p style="margin-left: 2.5em; text-indent: -2.5em;">E<br> | |
162 | Normal error message (LogLevel error) | |
163 | </p> | |
164 | <p style="margin-left: 2.5em; text-indent: -2.5em;">I<br> | |
165 | Informational message (LogLevel info) | |
166 | </p> | |
167 | <p style="margin-left: 2.5em; text-indent: -2.5em;">N<br> | |
168 | Notice message (LogLevel notice) | |
169 | </p> | |
170 | <p style="margin-left: 2.5em; text-indent: -2.5em;">W<br> | |
171 | Warning message (LogLevel warn) | |
172 | </p> | |
173 | <p style="margin-left: 2.5em; text-indent: -2.5em;">X<br> | |
174 | Emergency error message (LogLevel emerg) | |
175 | </p> | |
176 | <p>The <em>date-time</em> field contains the date and time of when the page started printing. The format of this field is identical to the data-time field in the <em>access_log</em> file. | |
177 | </p> | |
178 | <p>The <em>message</em> field contains a free-form textual message. | |
179 | Messages from job filters are prefixed with "[Job NNN]" where "NNN" is the job ID. | |
180 | </p> | |
181 | <h3 id="cupsd-logs-5.description.page-log-file-format">Page Log File Format</h3> | |
182 | <p>The <em>page_log</em> file lists the total number of pages (sheets) that are printed. | |
183 | By default, each line contains the following information: | |
184 | </p> | |
185 | <pre> | |
186 | <em>printer user job-id date-time </em><strong>total </strong><em>num-sheets job-billing | |
187 | job-originating-host-name job-name media sides</em> | |
188 | ||
189 | </pre> | |
190 | <p>For example the entry for a two page job called "myjob" might look like: | |
191 | </p> | |
192 | <pre> | |
193 | DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123 | |
194 | localhost myjob na_letter_8.5x11in one-sided | |
195 | ||
196 | </pre> | |
197 | <p>The PageLogFormat directive in the | |
198 | <a href="cupsd.conf.html"><strong>cupsd.conf</strong>(5)</a> | |
199 | ||
200 | file can be used to change this information. | |
201 | </p> | |
202 | <p>The <em>printer</em> field contains the name of the printer that printed the page. | |
203 | If you send a job to a printer class, this field will contain the name of the printer that was assigned the job. | |
204 | </p> | |
205 | <p>The <em>user</em> field contains the name of the user (the IPP requesting-user-name attribute) that submitted this file for printing. | |
206 | </p> | |
207 | <p>The <em>job-id</em> field contains the job number of the page being printed. | |
208 | </p> | |
209 | <p>The <em>date-time</em> field contains the date and time of when the page started printing. | |
210 | The format of this field is identical to the data-time field in the <em>access_log</em> file. | |
211 | </p> | |
212 | <p>The <em>num-sheets</em> field provides the total number of pages (sheets) that have been printed on for the job. | |
213 | </p> | |
214 | <p>The <em>job-billing</em> field contains a copy of the job-billing or job-account-id attributes provided with the IPP Create-Job or Print-Job requests or "-" if neither was provided. | |
215 | </p> | |
216 | <p>The <em>job-originating-host-name</em> field contains the hostname or IP address of the client that printed the job. | |
217 | </p> | |
218 | <p>The <em>job-name</em> field contains a copy of the job-name attribute provided with the IPP Create-Job or Print-Job requests or "-" if none was provided. | |
219 | </p> | |
220 | <p>The <em>media</em> field contains a copy of the media or media-col/media-size attribute provided with the IPP Create-Job or Print-Job requests or "-" if none was provided. | |
221 | </p> | |
222 | <p>The <em>sides</em> field contains a copy of the sides attribute provided with the IPP Create-Job or Print-Job requests or "-" if none was provided. | |
223 | </p> | |
224 | <h2 id="cupsd-logs-5.see-also">See Also</h2> | |
225 | <a href="cupsd.html"><p><strong>cupsd</strong>(8),</a> | |
226 | ||
227 | <a href="cupsd.conf.html"><strong>cupsd.conf</strong>(5),</a> | |
228 | ||
229 | <a href="cups-files.conf.html"><strong>cups-files.conf</strong>(5),</a> | |
230 | ||
231 | CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>) | |
232 | </p> | |
233 | <h2 id="cupsd-logs-5.copyright">Copyright</h2> | |
234 | <p>Copyright © 2020-2024 by OpenPrinting. | |
235 | </body> | |
236 | </html> |