lpstat(1) lpstat(1)
NAME [Toc] [Back]
lpstat - report status information of the LP subsystem
SYNOPSIS [Toc] [Back]
lpstat [-drst] [-a[list]] [-c[list]] [-o[list]] [-p[list]] [-u[list]]
[-v[list]] [ID...]
DESCRIPTION [Toc] [Back]
The lpstat utility writes to standard output information about the
current status of the LP subsystem.
If no arguments are given, lpstat writes the status of all requests
made to lp by the user that are still in the output queue.
OPTIONS [Toc] [Back]
The lpstat utility supports the XBD specification, Section 10.2,
Utility Syntax Guidelines, except the option-arguments are optional
and cannot be presented as separate arguments.
Some of the options below can be followed by an optional list that can
be in one of two forms: a list of items separated from one another by
a comma, or a quoted list of items separated from one another by a
comma or one or more blank characters. See EXAMPLES.
The omission of a list following such options causes all information
relevant to the option to be written to standard output; for example:
lpstat -o
writes the status of all output requests that are still in the output
queue.
-a[list] Write the acceptance status of destinations for
output requests. The list argument is a list of
intermixed printer names and class names.
-c[list] Write the class names and their members. The list
argument is a list of class names.
-d Write the system default destination for output
requests. lpstat checks for the default destination
in the environment variable LPDEST. If that variable
is unset or empty, lpstat checks for the default
destination in the environment variable PRINTER. If
that variable is unset or empty, lpstat checks for
the default destination in the default queue.
-o[list] Write the status of output requests. The list
argument is a list of intermixed printer names, class
names and request IDs.
lpstat(1) lpstat(1)
-p[list] Write the status of printers. The list argument is a
list of printer names.
-r Write the status of the LP request scheduler.
-s Write a status summary, including the status of the
LP scheduler, the system default destination, the
list of class names and their members and the list of
printers and their associated devices.
-t Write all status information.
-u[list] Write the status of output requests for users. The
list argument is a list of login names. The maximum
number of login names allowed in a list is 50.
-v[list] Write the names of printers and the pathnames of the
devices associated with them. The list argument is a
list of printer names.
OPERANDS [Toc] [Back]
The following operands are supported:
ID Write the status of output request for ID. ID is a
request ID, as returned by lp.
dest Write the status of output request for dest. dest is
a printer name or class name.
STDIN [Toc] [Back]
Not used.
INPUT FILES [Toc] [Back]
None.
ENVIRONMENT VARIABLES [Toc] [Back]
The following environment variables affect the execution of lpstat:
LANG Provide a default value for the
internationalisation variables that are
unset or null. If LANG is unset or
null, the corresponding value from the
implementation-specific default locale
will be used. If any of the
internationalisation variables contains
an invalid setting, the utility will
behave as if none of the variables had
been defined.
LC_ALL If set to a non-empty string value,
override the values of all the other
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
lpstat(1) lpstat(1)
internationalisation variables.
LC_CTYPE Determine the locale for the
interpretation of sequences of bytes of
text data as characters (for example,
single- as opposed to multi-byte
characters in arguments).
LC_MESSAGES Determine the locale that should be used
to affect the format and contents of
diagnostic messages written to standard
error, and informative messages written
to standard output.
LC_TIME Determine the format of date and time
strings output when displaying line
printer status information with the -a,
-o, -p, -t, or -u options.
NLSPATH Determine the location of message
catalogues for the processing of
LC_MESSAGES.
TZ Determine the timezone used with date
and time strings.
LPDEST Determine the output device or
destination. If the LPDEST environment
variable is not set, the PRINTER
environment variable is used.
PRINTER Determine the output device or
destination. If the PRINTER environment
variable is not set, the default queue
is used. LPDEST environment variable
takes precedence over PRINTER.
ASYNCHRONOUS EVENTS [Toc] [Back]
Default.
STDOUT [Toc] [Back]
The standard output is a text file containing the information
described in OPTIONS, in an unspecified format.
STDERR [Toc] [Back]
Used only for diagnostic messages.
OUTPUT FILES [Toc] [Back]
None.
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003
lpstat(1) lpstat(1)
EXTENDED DESCRIPTION [Toc] [Back]
None.
EXIT STATUS [Toc] [Back]
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
CONSEQUENCES OF ERRORS [Toc] [Back]
Default.
APPLICATION USAGE [Toc] [Back]
The lpstat utility cannot reliably determine the status of print
requests in all conceivable circumstances. When the printer is under
the control of another operating system or resides on a remote system
across a network, it need not be possible to determine the status of
the print job after it has left the control of the local operating
system. Even on local printers, spooling hardware in the printer may
make it appear that the print job has been completed long before the
final page is printed.
EXAMPLES [Toc] [Back]
1. Obtain the status of two printers, the pathnames of two printers,
a list of all class names and the status of the request named
HiPri-33:
lpstat -plaser1,laser4 -v"laser2 laser3" -cHiPri-33
2. Obtain user print job status using the obsolescent mixed blank
and comma form:
lpstat -u"ddg,gmv, maw"
FUTURE DIRECTIONS [Toc] [Back]
A version of lpstat that fully supports the XBD specification, Section
10.2, Utility Syntax Guidelines may be introduced in a future issue.
SEE ALSO [Toc] [Back]
cancel(1), lp(1).
CHANGE HISTORY [Toc] [Back]
First released in Issue 2.
Issue 3 [Toc] [Back]
The operation of this utility in an 8-bit transparent manner has been
noted.
The operation of this utility in an internationalised environment has
been described.
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: August 2003
lpstat(1) lpstat(1)
Issue 4 [Toc] [Back]
Format reorganised.
Exceptions to Utility Syntax Guidelines conformance noted.
Internationalised environment variable support mandated.
STANDARDS CONFORMANCE [Toc] [Back]
lpstat: SVID2, SVID3, XPG2, XPG3, XPG4
- 5 - Formatted: January 24, 2005
lpstat(1) lpstat(1)
HP-UX EXTENSIONS
DESCRIPTION [Toc] [Back]
Any arguments that are not options are assumed to be request ids (as
returned by lp) or LP destinations. lpstat prints the status of
requests corresponding to such request ids or the status of requests
belonging to such destinations. options can appear in any order and
can be repeated and intermixed with other arguments.
-i Inhibit the reporting of remote status.
-o[list] Also see the -i option.
-t Print all status information. Same as specifying -r,
-s, -a, -p, -o. See the -i option.
Security Restriction [Toc] [Back]
Only users who have the lp subsystem authorization or the printqueue
secondary subsystem authorization can view the entire queue.
Unauthorized users can view only their own jobs whose sensitivity
levels are dominated by the user's current sensitivity level.
The allowmacaccess privilege allows viewing jobs at higher sensitivity
levels.
EXAMPLES [Toc] [Back]
Check whether your job is queued:
lpstat
Check the relative position of a queued job:
lpstat -t
Verify that the job scheduler is running:
lpstat -r
FILES [Toc] [Back]
/var/spool/lp/*
/var/adm/lp/*
/etc/lp/*
/usr/lib/lp/*
SEE ALSO [Toc] [Back]
enable(1), lp(1), rlpstat(1M).
STANDARDS CONFORMANCE [Toc] [Back]
lpstat: SVID2, SVID3, XPG2, XPG3, XPG4
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003 [ Back ] |