| 1 |
.ds VE LPRng-3.9.0 |
| 2 |
.TH LPC 8 \*(VE "LPRng" |
| 3 |
.ig |
| 4 |
lpc.1,v 3.36 1998/03/29 18:37:49 papowell Exp |
| 5 |
Mon Jul 17 20:14:17 PDT 1995 Patrick Powell |
| 6 |
.. |
| 7 |
.SH NAME |
| 8 |
lpc \- line printer control program |
| 9 |
.SH SYNOPSIS |
| 10 |
.B lpc |
| 11 |
[ |
| 12 |
.BI \-A |
| 13 |
] |
| 14 |
[ |
| 15 |
.BI \-a |
| 16 |
] |
| 17 |
[ |
| 18 |
.BI \-D debugopts |
| 19 |
] |
| 20 |
[ |
| 21 |
.BI \-P printer |
| 22 |
] |
| 23 |
[ |
| 24 |
.BI \-S server |
| 25 |
] |
| 26 |
[ |
| 27 |
.BI \-U username |
| 28 |
] |
| 29 |
[ |
| 30 |
.B \-V |
| 31 |
] |
| 32 |
[ command [ argument ... ] ] |
| 33 |
.SH DESCRIPTION |
| 34 |
.I Lpc |
| 35 |
is used by the system administrator to control the |
| 36 |
operation of the line printer system. |
| 37 |
For each line printer configured in |
| 38 |
.I /etc/printcap |
| 39 |
or the printcaps specified in the configuration file |
| 40 |
.I /etc/lprng/lpd.conf |
| 41 |
(see lpd.conf(5)), |
| 42 |
.I lpc |
| 43 |
may be used to: |
| 44 |
.IP \(bu 3 |
| 45 |
disable or enable a single or all printer, |
| 46 |
.IP \(bu 3 |
| 47 |
disable or enable a single printer's or all printer's spooling queue, |
| 48 |
.IP \(bu 3 |
| 49 |
move jobs to the top a queue |
| 50 |
.IP \(bu 3 |
| 51 |
find the status of printers, and their associated |
| 52 |
spooling queues and printer daemons, |
| 53 |
.IP \(bu 3 |
| 54 |
start and stop printer servers for a queue with multiple print servers, |
| 55 |
.IP \(bu 3 |
| 56 |
hold and release a specific job in a printer queue, |
| 57 |
.IP \(bu 3 |
| 58 |
redirect printing to another printer, |
| 59 |
.IP \(bu 3 |
| 60 |
restart a printer job after having solved printer problems and let it |
| 61 |
print from the beginning, |
| 62 |
.IP \(bu 3 |
| 63 |
reprint a job |
| 64 |
.PP |
| 65 |
Without any arguments, |
| 66 |
.I lpc |
| 67 |
will prompt for commands from the standard input. |
| 68 |
If arguments are supplied, |
| 69 |
.IR lpc |
| 70 |
interprets the first argument as a command and the remaining |
| 71 |
arguments as parameters to the command. |
| 72 |
Permission to use spool queue control commands is determined by the |
| 73 |
printer permissions file |
| 74 |
(See FILES). |
| 75 |
.SH OPERATION |
| 76 |
.PP |
| 77 |
The operation of each spool queue is controlled by a |
| 78 |
.I "spoolcontrol" |
| 79 |
file which has a set of keyword options and values. |
| 80 |
(Other print spoolers have used permissions bits of directories and files |
| 81 |
for similar purposes). |
| 82 |
In addition, |
| 83 |
each job in the spool queue can have a |
| 84 |
.I "holdfile" |
| 85 |
which contains detailed information on how the spooler is to treat the |
| 86 |
particular job. |
| 87 |
The server will update these files with status and other information as the |
| 88 |
job is processed. |
| 89 |
The |
| 90 |
.I lpc |
| 91 |
command operates by sending requests to the |
| 92 |
.I lpd |
| 93 |
server process to update the information in these files and to signal |
| 94 |
server processes that the information has been updated. |
| 95 |
.SH OPTIONS |
| 96 |
.IP "\fB\-A\fR" 5 |
| 97 |
Use authentication specified by the value of the AUTH environment variable. |
| 98 |
.IP "\fB\-a\fR" 5 |
| 99 |
Alias for -Pall. |
| 100 |
.IP "\fB\-P\fIprinter\fR" 5 |
| 101 |
Printer spool queue to operate on. |
| 102 |
if no name is given, |
| 103 |
the -P option, |
| 104 |
the printer selected by the value of the PRINTER environment variable, |
| 105 |
or the first entry in the printcap file will be used. |
| 106 |
When all printers are selected, |
| 107 |
the LPC command will first attempt to find the |
| 108 |
printcap entry for printer ``all''; |
| 109 |
the |
| 110 |
.I all |
| 111 |
printcap field value will be a list of printers to control. |
| 112 |
If there is no printcap entry, |
| 113 |
then the request is directly forwarded to the default LPD host, |
| 114 |
which will do a lookup for all of the available printers. |
| 115 |
By specifying ``all@host'', |
| 116 |
the user can control all printers on a given host. |
| 117 |
.IP "\fB\-S\fIserver\fR" 5 |
| 118 |
Send commands to this server, |
| 119 |
rather than the one specified by the |
| 120 |
\fB\-P\fIprinter\fR" |
| 121 |
or printcap entry. |
| 122 |
This allows you to use a default printcap entry for |
| 123 |
authentication information or other setup information, |
| 124 |
but direct queries to a specific server. |
| 125 |
.IP "\fB\-V\fR" 5 |
| 126 |
Print program version information |
| 127 |
.IP "\fB\-U\fIusername\fP\fR" 5 |
| 128 |
Set the user name for the request. This option is available only to |
| 129 |
user root or to the userids listed in the |
| 130 |
.I allow_user_setting |
| 131 |
configuration option. |
| 132 |
.IP "\fB\-D\fIdebugopts\fP" 5 |
| 133 |
Debugging is controlled using the |
| 134 |
.B \-D |
| 135 |
option. This accepts a comma-separated list of debugging |
| 136 |
settings. These settings take one of two forms: |
| 137 |
.B facility=value , |
| 138 |
or |
| 139 |
.B value |
| 140 |
to set an overall default value. |
| 141 |
The form -D= will display a list of debugging options. |
| 142 |
.SH COMMANDS |
| 143 |
.PP |
| 144 |
The following is the alphabetical list of recognized commands. |
| 145 |
The jobcontrol or holdfile fields effective are listed as |
| 146 |
part of the command. |
| 147 |
.TP |
| 148 |
? |
| 149 |
.br |
| 150 |
Help. |
| 151 |
Also, any unrecognized input produces a help listing. |
| 152 |
.TP |
| 153 |
active [pr@[host]] |
| 154 |
.br |
| 155 |
makes a connection to the LPD server for the specified printer. |
| 156 |
Closes the connection after making it. |
| 157 |
This is useful for checking to see if a non-LPRng server is active. |
| 158 |
.TP |
| 159 |
abort { all | printer* } |
| 160 |
.br |
| 161 |
Kill the active job and disables unspooling. |
| 162 |
The active job will not be deleted from the queue. |
| 163 |
.br |
| 164 |
Action: kills server process, updates spool control file |
| 165 |
.I printing_disabled |
| 166 |
field. |
| 167 |
.TP |
| 168 |
class {all | printer } (off | classlist | X=globmatch) |
| 169 |
.br |
| 170 |
Controls the class of jobs currently being printed. |
| 171 |
The |
| 172 |
.I off |
| 173 |
option removes any class restrictions. |
| 174 |
The classlist option is a list of classes; |
| 175 |
for example A,B,C would release classes A, B, and C for printing. |
| 176 |
The X=globmatch form performs a match against a control file entry |
| 177 |
starting with the indicated capital letter. |
| 178 |
For example, J=*form1* would allow jobs which had the string |
| 179 |
form1 in their job title to be printed. |
| 180 |
.TP |
| 181 |
defaultq |
| 182 |
.br |
| 183 |
Lists the default queue for the LPC program. |
| 184 |
.TP |
| 185 |
defaults |
| 186 |
.br |
| 187 |
Lists default values for the configuration information. |
| 188 |
.TP |
| 189 |
debug j all | printer } [string | off ] |
| 190 |
.br |
| 191 |
Set the debugging string for the specified printer. |
| 192 |
This is a diagnostic aid and should be used with caution; |
| 193 |
refer to the reference manual for details of the debugging string format. |
| 194 |
In general, |
| 195 |
you can use: |
| 196 |
.br |
| 197 |
.I INTEGER |
| 198 |
\- the integer number sets the general debugging level |
| 199 |
.br |
| 200 |
keyword=value |
| 201 |
.br |
| 202 |
\- sets a debugging variable to a specified value |
| 203 |
.br |
| 204 |
keyword |
| 205 |
\- sets a debugging flag |
| 206 |
.br |
| 207 |
Action: updates spool control file |
| 208 |
.I debug |
| 209 |
field. |
| 210 |
.TP |
| 211 |
disable { all | printer } |
| 212 |
.br |
| 213 |
Disable spooling to the specified spool queues. |
| 214 |
See |
| 215 |
.I enable. |
| 216 |
.br |
| 217 |
Action: updates spool control file |
| 218 |
.I printing_disabled |
| 219 |
field. |
| 220 |
.TP |
| 221 |
down {all | printer } |
| 222 |
.br |
| 223 |
Disable both queuing and printing for all printers or the selected printer. |
| 224 |
See |
| 225 |
.I up. |
| 226 |
.br |
| 227 |
Action: updates spool control file |
| 228 |
.I printing_disabled |
| 229 |
and |
| 230 |
.I spooling_disabled |
| 231 |
fields. |
| 232 |
.TP |
| 233 |
enable { all | printer } |
| 234 |
.br |
| 235 |
Enable spooling for all printers or the selected printer. |
| 236 |
.br |
| 237 |
Action: updates spool control file |
| 238 |
.I spooling_disabled |
| 239 |
field. |
| 240 |
.TP |
| 241 |
exit or quit |
| 242 |
.br |
| 243 |
terminate LPC program |
| 244 |
.TP |
| 245 |
help |
| 246 |
.br |
| 247 |
Print a short help message. |
| 248 |
.TP |
| 249 |
hold printer { jobid } |
| 250 |
.br |
| 251 |
Holds the specified printer job (or jobs) in the queue. |
| 252 |
The job will not be |
| 253 |
printed even if spooling and printing is enabled. It must be released |
| 254 |
with the release command. |
| 255 |
The holdall command |
| 256 |
or :ah: printcap flag can enable automatic holding of spooled jobs. |
| 257 |
.br |
| 258 |
Action: updates job holdfile |
| 259 |
.I hold |
| 260 |
field with time that job was held. |
| 261 |
A 0 value release job for printing. |
| 262 |
.TP |
| 263 |
holdall { all | printer ... } |
| 264 |
.br |
| 265 |
Turn on automatic job holding of new jobs. |
| 266 |
New jobs will be marked as held, |
| 267 |
and held until released with the release command. |
| 268 |
This will be done until holdall is turned off with the noholdall command. |
| 269 |
The :ah: printcap flag can enable automatic holding as well. |
| 270 |
.br |
| 271 |
Action: updates spool control file |
| 272 |
.I holdall |
| 273 |
field. |
| 274 |
.TP |
| 275 |
kill { all | printer ... } |
| 276 |
.br |
| 277 |
Do an abort command followed by a start command. |
| 278 |
This is a quick way to kill off a server that has problems. |
| 279 |
Note that due to race conditions and delays, |
| 280 |
that the start command may not be effective this action should |
| 281 |
be monitored to ensure that the job restarts. |
| 282 |
.TP |
| 283 |
client { all | printer ... } |
| 284 |
.br |
| 285 |
Show the LPRng client configuration and printcap information on the local host. |
| 286 |
This is an extremely useful diagnostic tool. |
| 287 |
.TP |
| 288 |
lpd [printer@[host]] |
| 289 |
.br |
| 290 |
determines if LPD daemon process on the print server is running, |
| 291 |
and gets the PID. |
| 292 |
This is handy to determine if the LPD daemon was killed or |
| 293 |
aborted due to abnormal conditions. |
| 294 |
.TP |
| 295 |
lpq printer [options] |
| 296 |
.br |
| 297 |
Run |
| 298 |
.I lpq |
| 299 |
from inside the |
| 300 |
.I lpc |
| 301 |
program. |
| 302 |
.TP |
| 303 |
lprm printer jobid [jobid]* |
| 304 |
.br |
| 305 |
Run |
| 306 |
.I lprm |
| 307 |
from inside the |
| 308 |
.I lpc |
| 309 |
program. |
| 310 |
Not all options are supported - this form requires |
| 311 |
the printer name and jobid to be specified explicitly. |
| 312 |
.TP |
| 313 |
move printer jobid destinationPrinter |
| 314 |
.br |
| 315 |
Send the specified jobs to the destination printer and remove them |
| 316 |
from the printer queue. |
| 317 |
.br |
| 318 |
Action: updates the job holdfile |
| 319 |
.I move |
| 320 |
field with the destination and starts a server process to do the |
| 321 |
job transfer. |
| 322 |
.TP |
| 323 |
msg printer message text |
| 324 |
.br |
| 325 |
Update the status message for the printer. |
| 326 |
An empty message will remove the status message. |
| 327 |
.TP |
| 328 |
noholdall { all | printer* } |
| 329 |
.br |
| 330 |
Turn off automatic job holding. |
| 331 |
See holdall command. |
| 332 |
.TP |
| 333 |
quit or exit |
| 334 |
.br |
| 335 |
terminate LPC program |
| 336 |
.TP |
| 337 |
redirect [printer [destinationPrinter | off ]] |
| 338 |
.br |
| 339 |
redirect the jobs in the printer queue to another printer |
| 340 |
or turn redirection off. |
| 341 |
.br |
| 342 |
Action: updates spool control file |
| 343 |
.I redirect |
| 344 |
field. |
| 345 |
.TP |
| 346 |
redo [printer [jobid]] |
| 347 |
.br |
| 348 |
Reprint the selected job. |
| 349 |
.TP |
| 350 |
release [printer [jobid]] |
| 351 |
.br |
| 352 |
Releases the selected job for printing. |
| 353 |
.TP |
| 354 |
reread [ printer [@host] ] |
| 355 |
.br |
| 356 |
Sends a request to the LPD server for the printer to reread the |
| 357 |
configuration and printcap information. |
| 358 |
This is equivalent to using |
| 359 |
kill -HUP serverpid, |
| 360 |
but can be done for servers on remote hosts. |
| 361 |
.TP |
| 362 |
server { all | printer } |
| 363 |
.br |
| 364 |
Shows the printcap entries for the printer or all printers as the LPD server |
| 365 |
would use them. |
| 366 |
.TP |
| 367 |
start { all | printer } |
| 368 |
.br |
| 369 |
Start the printer. |
| 370 |
This is useful when some abnormal condition causes the server to |
| 371 |
terminate unexpectedly leaving jobs in the queue. |
| 372 |
.I Lpq |
| 373 |
will report that there is no daemon present when this condition occurs. |
| 374 |
.TP |
| 375 |
status { all | printer } |
| 376 |
Display the status of daemons and queues on the local machine. |
| 377 |
.TP |
| 378 |
stop { all | printer } |
| 379 |
.br |
| 380 |
Disable any further unspooling after the current job completes. |
| 381 |
.TP |
| 382 |
topq printer [ jobid ] |
| 383 |
.br |
| 384 |
Place the selected jobs at the top of the printer queue. |
| 385 |
.TP |
| 386 |
up {all | printer ...} |
| 387 |
Enables queuing and printing for the specified or all printers. |
| 388 |
Privileged. |
| 389 |
.SH JOBIDS |
| 390 |
.PP |
| 391 |
The LPQ command displays a job identifier for each job, |
| 392 |
which can be used in LPC commands to identify a specific job. |
| 393 |
In the commands descriptions above, |
| 394 |
the jobid can be a user name, |
| 395 |
a job number, |
| 396 |
a job identifier, |
| 397 |
or a glob pattern. |
| 398 |
The glob pattern is matched against the job identifier. |
| 399 |
In command which have an optional jobid, |
| 400 |
if none is specified then the first printable job in the queue is acted on. |
| 401 |
.SH FILES |
| 402 |
.PP |
| 403 |
The files used by LPRng are set by values in the |
| 404 |
printer configuration file. |
| 405 |
The following are a commonly used set of default values. |
| 406 |
.nf |
| 407 |
.ta \w'/var/spool/lpd/printcap.<hostname> 'u |
| 408 |
/etc/lprng/lpd.conf LPRng configuration file |
| 409 |
${HOME}/.printcap user printer description file |
| 410 |
/etc/printcap printer description file |
| 411 |
/etc/lprng/lpd.perms permissions |
| 412 |
/var/run/lprng/lpd lock file for queue control |
| 413 |
/var/spool/lpd spool directories |
| 414 |
/var/spool/lpd/QUEUE/control queue control |
| 415 |
/var/spool/lpd/QUEUE/log trace or debug log file |
| 416 |
/var/spool/lpd/QUEUE/acct accounting file |
| 417 |
/var/spool/lpd/QUEUE/status status file |
| 418 |
.fi |
| 419 |
.SH "SEE ALSO" |
| 420 |
lpd.conf(5), |
| 421 |
lpd(8), |
| 422 |
checkpc(8), |
| 423 |
lpr(1), |
| 424 |
lpq(1), |
| 425 |
lprm(1), |
| 426 |
printcap(5), |
| 427 |
lpd.perms(5), |
| 428 |
pr(1), lprng_certs(1), lprng_index_certs(1). |
| 429 |
.SH DIAGNOSTICS |
| 430 |
.nf |
| 431 |
Most of the diagnostics are self explanatory. |
| 432 |
If you are puzzled over the exact cause of failure, |
| 433 |
set the debugging level on (-D5) and run again. |
| 434 |
The debugging information will |
| 435 |
help you to pinpoint the exact cause of failure. |
| 436 |
.fi |
| 437 |
.SH "HISTORY" |
| 438 |
LPRng is a enhanced printer spooler system |
| 439 |
with functionality similar to the Berkeley LPR software. |
| 440 |
The LPRng mailing list is [email protected]; |
| 441 |
subscribe by sending mail to [email protected] with |
| 442 |
the word subscribe in the body. |
| 443 |
The software is available from ftp://ftp.lprng.com/pub/LPRng. |
| 444 |
.SH "AUTHOR" |
| 445 |
Patrick Powell <[email protected]>. |