unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



lpd(8)								       lpd(8)



NAME

  lpd -	line printer daemon

SYNOPSIS

  /usr/lbin/lpd	[-l]

OPTIONS

  -l  Causes the lpd daemon to log valid requests received from	the network.
      This option is useful for	debugging.

DESCRIPTION

  The lpd line printer daemon (spool area handler) normally is invoked at
  boot time.  The daemon makes a single	pass through the printcap(4) file to
  determine the	existing printers and to print all files that were not
  printed before the system shut down. The daemon uses system calls listen(2)
  and accept(2)	to receive requests to print files in the queue, to transfer
  files	to the spooling	area, and to display the queue or remove jobs from
  the queue.  In each case, the	daemon forks a child process to	handle the
  request so that the parent process can continue to listen for	more
  requests.  The Internet port number used to interact with other processes
  is identified	with the getservbyname(3) system call and is specified in the
  /etc/services	file by	its printer service record entry.

  Access control is provided by	the following means:

  All requests must originate from one of the machines listed in the
  /etc/hosts.equiv or /etc/hosts.lpd file.

  When an rs capability, which restricts remote	users to those with local
  accounts, is specified in the	/etc/printcap file for the printer being
  accessed, an lpr or lp request is honored only for those users having
  accounts on the same machine as the printer.

  The minfree ASCII file in each spool directory contains the number of	disk
  blocks to leave free so that the line	printer	queue will not completely
  fill the disk.

  The lock file	in each	/usr/spool subdirectory	is used	to prevent more	than
  one active lpd daemon	and to store information about the daemon process for
  other	printer	spooling commands.

  After	the lpd	daemon has successfully	set the	lock in	the lock file, it
  scans	the /usr/spool subdirectory for	files beginning	with the characters
  cf.  Records in each of the cf files specify files to	be printed or specify
  one or more non-printing actions to be performed.  Each such record begins
  with a key character that specifies what to do with the remainder of the
  line.	 In the	following table, the columns list the beginning	key charac-
  ter, the key-character name, and its purpose:

  H Hostname
      Name of the machine where	the lpr	daemon or the lp command was invoked.

  P Person
      Login name of the	person who invoked the lpr or lp commands.  This
      record is	used to	verify ownership by the	lprm or	cancel commands.

  J Job	Name
      String to	be used	for the	job name on the	burst page.

  C Classification
      String to	be used	for the	classification line on the burst page.

  L Literal
      The record line provides identification information from the etc/passwd
      file and initiates banner	page printing.

  I Indentation
      The number of character spaces to	indent the output (spacing is from
      the ASCII	character set).

  M Notify
      Sends mail to the	specified user when the	current	print job completes.

  1 Troff Font R
      Name of another font file	to use in place	of the default font file.

  2 Troff Font I
      Name of another font file	to use in place	of the default font file.

  3 Troff Font B
      Name of another font file	to use in place	of the default font file.

  4 Troff Font S
      Name of another font file	to use in place	of the default font file.

  W Width
      Changes the page width (in characters) used by the pr command and	by
      text filters.

  <&lt; Input tray
      Selects the input	tray that supplies paper for the print job.

  >&gt; Output tray
      Selects the output tray where the	printed	paper is deposited.

  O Orientation
      Specifies	the orientation	of the printed output on the page. Note	that
      for certain print	filters, such as pcfof,	the O option is	used to
      specify other options such as even to print even-numbered	pages.

  K Sides
      Specifies	whether	the job	should be printed on both sides	of the physi-
      cal sheet	and whether the	pages should be	rotated	by 180 degrees.

  T Title
      String to	be used	as the title for the pr	command.

  f Formatted File
      Name of an already formatted file	to print.

  p File Name
      Name of a	file to	print using the	pr command as a	filter.

  l Formatted File
      Similar to f, but	passes control characters and does not make page
      breaks.

  t Troff File
      The file contains	troff output (cat phototypesetter commands).

  n Ditroff File
      The file contains	DVI (device-independent) troff output.

  d DVI	File
      The file contains	Tex(l) output (DVI format from Stanford).

  v Raster Image
      The file contains	a raster image.

  c Cifplot File
      The file contains	data produced by the cifplot command.

  r Fortran
      The file contains	text data with Fortran carriage	control	characters.

  x Unfiltered output
      Do not interpret any control characters in the file.

  U Unlink
      Name of file to remove on	completion of printing.

  N Filename
      The name of the file undergoing printing,	or when	blank, for the stan-
      dard input (when the lpr or lp command is	invoked	in a pipeline or when
      the command is invoked from the standard input).

  Whenever a file cannot be opened for printing, a message is logged via the
  syslog(3) subroutine using theLOG_LPR	facility.  In this case, the lpd dae-
  mon tries to reopen a	file, which it expects to be referenced	by a correct
  pathname, up to 20 times.  If	a file cannot be opened	after 20 tries,	lpd
  goes to the next file.

  The  lpd daemon uses the flock(2) system call	to provide exclusive access
  to the lock file and to prevent multiple daemons from	being simultaneously
  activated.  If the daemon is killed or dies unexpectedly, the	lock file
  does not have	to be removed.

  The 2-line ASCII /usr/spool/lock file	contains two lines.  The first line
  specifies the	process	ID of the daemon, and the second line specifies	the
  control file name of the job currently undergoing printing.  The second
  line is updated to reflect the current status	of the lpd daemon for com-
  mands	lpq, lprm, cancel, and lpstat.

  NOTE - Printer Log Files


  The lpd does not automatically purge log files.  You should monitor logs
  regularly or set up a	cleaning task using the	cron command. See similar
  commands for syslog.dated in /usr/var/spool/cron/crontabs

FILES

  /usr/lbin/lpd
      Specifies	the command path.

  /etc/printcap
      Printer description file.

  /usr/spool/*
      Spool directories.  The location of spool	directories is a convention,
      but not necessary	(see the /etc/printcap file).

  /usr/spool/*/lock
      The transient lock file which records print daemon and job status.

  /usr/spool/lpd/lpd.lock
      On clustered systems, this transient file	is created to contain the
      daemon status.  Note that	the /usr/spool/lpd directory is	a Context
      Dependent	Symbolic Link (CDSL) and should	not be manually	created	or
      destroyed.

  /usr/spool/*/minfree
      Minimum free disk	space to leave.

  /dev/lp*
      Line printer devices.

  /dev/printer
      Socket for local requests.

  /etc/hosts.equiv
      Lists machine names allowed access to a printer.

  /etc/hosts.lpd
      Lists machine names allowed access to a printer, but which are not
      under same administrative	control.

SEE ALSO

  Commands: cancel(1), lp(1), lpc(8), lpr(1), lpq(1), lpstat(1), lprm(1),
  pac(8), pcfof(8)

  Calls: syslog(3)