Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lpc(1)

lpq(1)

lprm(1)

printcap(4)



  lpd(8)                              CLIX                              lpd(8)



  NAME

    lpd - Runs the line printer daemon

  SYNOPSIS

    /usr/lib/lpd [-l] [port#]

  FLAGS

    -l   Turns on logging of requests from the network

  DESCRIPTION

    The lpd is the line printer daemon (spool area handler) and is normally
    invoked at boot time from the rc2.d file.  It makes a single pass through
    the printcap(4) file to find information on the existing printers, and
    prints any files remaining after a crash.  It then uses the functions
    listen() and accept() to receive requests to print files in the queue,
    transfer files to the spooling area, display the queue, or remove jobs
    from the queue.  In each case, it forks a child process to handle the
    request so the parent can continue to listen for more requests.

    The Internet port number used to rendezvous with other processes is
    normally obtained with getservbyname, but can be changed with the port#
    argument.

    The -l flag causes lpd to log valid requests received from the network;
    this is useful for debugging.

    Access control is provided by two means.  First, all requests must come
    from one of the machines listed in the file /etc/hosts.equiv or
    /etc/hosts.lpd.  Second, if the rs capability is specified in the printcap
    entry for the printer being accessed, lpr requests will only be honored
    for users with accounts on the printer's host.

    The file minfree 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 minfree file can be edited with a text editor.

    The file lock in each spool directory is used to prevent multiple daemons
    from becoming active simultaneously and to store information about the
    daemon process for the lpr lpq, and lprm commands.  After the daemon has
    successfully set the lock, it scans the directory for files matching the
    pattern cf*.  Lines in each cf* file specify files to be printed, or
    nonprinting actions to be performed.  Each such line begins with a key
    character to specify what to do with the remainder of the line.

    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



  2/94 - Intergraph Corporation                                              1






  lpd(8)                              CLIX                              lpd(8)



        burst page.

    L   Literal.  The line contains identification information from the
        password file and causes the banner page to be printed.

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

    H   Hostname.  Name of the machine where lpr(1) was invoked.

    P   Person.  Login name of the person who invoked lpr.  This is used to
        verify ownership by lprm.

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

    f   Formatted File.  Name of a file that is already formatted to print.

    l   Like f, but passes control characters and does not make page breaks.

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

    t   A troff file.  The file contains troff output.

    n   A ditroff file.  The file contains device-independent troff output.

    g   Graph file.  The file contains data produced by plot().

    v   The file contains a raster image.

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

    1   troff font R.  Name of the font file to use instead of the default.

    2   troff font I.  Name of the font file to use instead of the default.

    3   troff font B.  Name of the font file to use instead of the default.

    4   troff font S.  Name of the font file to use instead of the default.

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

    I   Indent.  The number of characters to indent the output by (in ASCII).

    U   Unlink.  Name of file to remove when printing is complete.

    N   Filename.  The name of the file which is being printed, or a blank for
        stdin (when lpr is invoked in a pipeline).

    If a file cannot be opened, a message will be logged through the console.
    The lpd command will try up to 20 times to reopen a file it expects to be
    there.  After attempting to reopen the file, it skips the file to be



  2                                              Intergraph Corporation - 2/94






  lpd(8)                              CLIX                              lpd(8)



    printed.

    The lpd command uses the fcntl() command to provide exclusive access to
    the lock file and to prevent multiple daemons from becoming active
    simultaneously.  If the daemon should be killed or die unexpectedly, the
    lock file need not be removed.  The lock file is kept in a readable ASCII
    form and contains two lines.  The first is the process ID of the daemon
    and the second is the control filename of the current job being printed.
    The second line is updated to reflect the current status of the lpd
    command for the programs lpq and lprm.

  EXAMPLES

    The following starts the line printer daemon with the default options:

    lpd


  FILES

    /etc/printcap          Printer description file.

    /usr/spool/*           Spool directories.

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

    /dev/lp*               Pine printer devices.

    /dev/printer           Socket for local requests.

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

    /etc/hosts.lpd         Lists machine names allowed printer access, but not
                           under the same administrative control.

  DIAGNOSTICS

    All diagnostic messages for the lpd command appear in the log file.

  EXIT VALUES

    The lpd command exits with a value of 1 when a fatal error occurs.

  RELATED INFORMATION

    Commands:  lpc(1), lpr, lpq(1), lprm(1)

    Files:  printcap(4)

    Intergraph System and Network Administrator's Guide.




  2/94 - Intergraph Corporation                                              3




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026