Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lpr(1)

lprm(1)

lpc(8)

lpd(8)



  lpq(1)                              CLIX                              lpq(1)



  NAME

    lpq - Examines and reports on the spool queue

  SYNOPSIS

    lpq [+[n]] [-l] [-P printer] [job ... ] [user ... ]

  FLAGS

    + [n]        Continuously monitor the print queue until there are no more
                 jobs queued.  The n parameter is the number of seconds to
                 wait between queue scans.  The default is 30 seconds.

    -l           Print information about the files that make up each job in
                 the queue.

    -P printer   Restrict output to that concerning only printer.

  DESCRIPTION

    The lpq command examines the spooling area used by lpd for printing files
    on the line printer and reports the status of the specified jobs or all
    jobs associated with a user.  lpq invoked without any arguments reports on
    any jobs currently in the queue.  A -P flag may be used to specify a
    particular printer.  Otherwise, the default line printer is used (or the
    value of $PRINTER in the environment).  If a + argument is supplied, lpq
    displays the spool queue until it empties.  Supplying a number immediately
    after the + sign indicates that lpq should sleep n seconds between queue
    scans.  All other arguments supplied are interpreted as user names or job
    numbers to filter only jobs of interest.

    For each job submitted (invocation of lpr) lpq reports the user's name,
    current rank in the queue, the names of files composing the job, the job
    identifier (a number that may be supplied to lprm for removing a specific
    job), and the total size in bytes.  The -l flag prints information about
    each of the files composing the job.  Normally, only the amount of
    information that will fit on one line is displayed.  Job ordering depends
    on the algorithm used to scan the spooling directory and is supposed to be
    first in first out (FIFO).  Filenames composing a job may be unavailable
    (when lpr is used as a sink in a pipeline).  In this case, the file is
    indicated as (standard input).

    If lpq warns that no daemon is present (for example, due to a
    malfunction), the lpc command can be used to restart the printer daemon.

  EXAMPLES

    1.  The following command reports information about all jobs queued for
        the printer laser1 every 5 seconds.




  2/94 - Intergraph Corporation                                              1






  lpq(1)                              CLIX                              lpq(1)



        lpq +5 -P laser1


    2.  The following command reports information about all files for all of
        user fred's requests.

        lpq -l fred


  FILES

    /etc/terminfo
           For manipulating the screen for repeated display

    /etc/printcap
           To determine printer characteristics

    /usr/spool/*
           The spooling directory, as determined from printcap

    /usr/spool/*/cf*
           Control files specifying jobs

    /usr/spool/*/lock
           The lock file to obtain the currently-active job

  NOTES

    Due to the dynamic nature of the information in the spooling directory,
    lpq may report unreliably.  Output formatting is sensitive to the line
    length of the terminal.  This can result in widely-spaced columns.

  DIAGNOSTICS

    The lpq command may be unable to open various files, have the lock file be
    malformed, or produce garbage files when no daemon is active but files are
    in the spooling directory.

  EXIT VALUES

    Exits with a value of 1 if the command line arguments are incorrect.
    Otherwise, exits with a value of 0.

  RELATED INFORMATION

    Commands: lpr(1), lprm(1), lpc(8), lpd(8)








  2                                              Intergraph Corporation - 2/94




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