.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "QSTAT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" qstat 
.SH PROLOG
This manual page is part of the POSIX Programmer's Manual.
The Linux implementation of this interface may differ (consult
the corresponding Linux manual page for details of Linux behavior),
or the interface may not be implemented on Linux.
.SH NAME
qstat \- show status of batch jobs
.SH SYNOPSIS
.LP
\fBqstat\fP \fB[\fP\fB-f\fP\fB]\fP \fIjob_identifier\fP \fB...
.br
.sp
qstat -Q\fP \fB[\fP\fB-f\fP\fB]\fP \fIdestination\fP \fB...
.br
.sp
qstat -B\fP \fB[\fP\fB-f\fP\fB]\fP \fIserver_name\fP \fB... \fP
\fB
.br
\fP
.SH DESCRIPTION
.LP
The status of a batch job, batch queue, or batch server is obtained
by a request to the server. The \fIqstat\fP utility is a
user-accessible batch client that requests the status of one or more
batch jobs, batch queues, or servers, and writes the status
information to standard output.
.LP
For each successfully processed batch \fIjob_identifier\fP, the \fIqstat\fP
utility shall display information about the
corresponding batch job.
.LP
For each successfully processed destination, the \fIqstat\fP utility
shall display information about the corresponding batch
queue.
.LP
For each successfully processed server name, the \fIqstat\fP utility
shall display information about the corresponding
server.
.LP
The \fIqstat\fP utility shall acquire batch job status information
by sending a \fIJob Status Request\fP to a batch server.
The \fIqstat\fP utility shall acquire batch queue status information
by sending a \fIQueue Status Request\fP to a batch server.
The \fIqstat\fP utility shall acquire server status information by
sending a \fIServer Status Request\fP to a batch server.
.SH OPTIONS
.LP
The \fIqstat\fP utility shall conform to the Base Definitions volume
of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
.LP
The following options shall be supported by the implementation:
.TP 7
\fB-f\fP
Specify that a full display is produced. 
.LP
The minimum contents of a full display are specified in the STDOUT
section.
.LP
Additional contents and format of a full display are implementation-defined.
.TP 7
\fB-Q\fP
Specify that the operand is a destination. 
.LP
The \fIqstat\fP utility shall display information about each batch
queue at each destination identified as an operand.
.TP 7
\fB-B\fP
Specify that the operand is a server name. 
.LP
The \fIqstat\fP utility shall display information about each server
identified as an operand.
.sp
.SH OPERANDS
.LP
If the \fB-Q\fP option is presented to the \fIqstat\fP utility, the
utility shall accept one or more operands that conform to
the syntax for a destination (see \fIDestination\fP ).
.LP
If the \fB-B\fP option is presented to the \fIqstat\fP utility, the
utility shall accept one or more \fIserver_name\fP
operands.
.LP
If neither the \fB-B\fP nor the \fB-Q\fP option is presented to the
\fIqstat\fP utility, the utility shall accept one or more
operands that conform to the syntax for a batch \fIjob_identifier\fP
(see \fIBatch Job
Identifier\fP ).
.SH STDIN
.LP
Not used.
.SH INPUT FILES
.LP
None.
.SH ENVIRONMENT VARIABLES
.LP
The following environment variables shall affect the execution of
\fIqstat\fP:
.TP 7
\fIHOME\fP
Determine the pathname of the user's home directory.
.TP 7
\fILANG\fP
Provide a default value for the internationalization variables that
are unset or null. (See the Base Definitions volume of
IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
for
the precedence of internationalization variables used to determine
the values of locale categories.)
.TP 7
\fILC_ALL\fP
If set to a non-empty string value, override the values of all the
other internationalization variables.
.TP 7
\fILC_COLLATE\fP
.sp
Determine the locale for the behavior of ranges, equivalence classes,
and multi-character collating elements within regular
expressions.
.TP 7
\fILC_CTYPE\fP
Determine the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as
opposed to multi-byte characters in arguments).
.TP 7
\fILC_MESSAGES\fP
Determine the locale that should be used to affect the format and
contents of diagnostic messages written to standard
error.
.TP 7
\fILC_NUMERIC\fP
.sp
Determine the locale for selecting the radix character used when writing
floating-point formatted output.
.sp
.SH ASYNCHRONOUS EVENTS
.LP
Default.
.SH STDOUT
.LP
If an operand presented to the \fIqstat\fP utility is a batch \fIjob_identifier\fP
and the \fB-f\fP option is not specified,
the \fIqstat\fP utility shall display the following items on a single
line, in the stated order, with white space between each
item, for each successfully processed operand:
.IP " *" 3
The batch \fIjob_identifier\fP
.LP
.IP " *" 3
The batch job name
.LP
.IP " *" 3
The \fIJob_Owner\fP attribute
.LP
.IP " *" 3
The CPU time used by the batch job
.LP
.IP " *" 3
The batch job state
.LP
.IP " *" 3
The batch job location
.LP
.LP
If an operand presented to the \fIqstat\fP utility is a batch \fIjob_identifier\fP
and the \fB-f\fP option is specified, the
\fIqstat\fP utility shall display the following items for each success
fully processed operand:
.IP " *" 3
The batch \fIjob_identifier\fP
.LP
.IP " *" 3
The batch job name
.LP
.IP " *" 3
The \fIJob_Owner\fP attribute
.LP
.IP " *" 3
The execution user ID
.LP
.IP " *" 3
The CPU time used by the batch job
.LP
.IP " *" 3
The batch job state
.LP
.IP " *" 3
The batch job location
.LP
.IP " *" 3
Additional implementation-defined information, if any, about the batch
job or batch queue
.LP
.LP
If an operand presented to the \fIqstat\fP utility is a destination,
the \fB-Q\fP option is specified, and the \fB-f\fP
option is not specified, the \fIqstat\fP utility shall display the
following items on a single line, in the stated order, with
white space between each item, for each successfully processed operand:
.IP " *" 3
The batch queue name
.LP
.IP " *" 3
The maximum number of batch jobs that shall be run in the batch queue
concurrently
.LP
.IP " *" 3
The total number of batch jobs in the batch queue
.LP
.IP " *" 3
The status of the batch queue
.LP
.IP " *" 3
For each state, the number of batch jobs in that state in the batch
queue and the name of the state
.LP
.IP " *" 3
The type of batch queue (execution or routing)
.LP
.LP
If the operands presented to the \fIqstat\fP utility are destinations,
the \fB-Q\fP option is specified, and the \fB-f\fP
option is specified, the \fIqstat\fP utility shall display the following
items for each successfully processed operand:
.IP " *" 3
The batch queue name
.LP
.IP " *" 3
The maximum number of batch jobs that shall be run in the batch queue
concurrently
.LP
.IP " *" 3
The total number of batch jobs in the batch queue
.LP
.IP " *" 3
The status of the batch queue
.LP
.IP " *" 3
For each state, the number of batch jobs in that state in the batch
queue and the name of the state
.LP
.IP " *" 3
The type of batch queue (execution or routing)
.LP
.IP " *" 3
Additional implementation-defined information, if any, about the batch
queue
.LP
.LP
If the operands presented to the \fIqstat\fP utility are batch server
names, the \fB-B\fP option is specified, and the
\fB-f\fP option is not specified, the \fIqstat\fP utility shall display
the following items on a single line, in the stated
order, with white space between each item, for each successfully processed
operand:
.IP " *" 3
The batch server name
.LP
.IP " *" 3
The maximum number of batch jobs that shall be run in the batch queue
concurrently
.LP
.IP " *" 3
The total number of batch jobs managed by the batch server
.LP
.IP " *" 3
The status of the batch server
.LP
.IP " *" 3
For each state, the number of batch jobs in that state and the name
of the state
.LP
.LP
If the operands presented to the \fIqstat\fP utility are server names,
the \fB-B\fP option is specified, and the \fB-f\fP
option is specified, the \fIqstat\fP utility shall display the following
items for each successfully processed operand:
.IP " *" 3
The server name
.LP
.IP " *" 3
The maximum number of batch jobs that shall be run in the batch queue
concurrently
.LP
.IP " *" 3
The total number of batch jobs managed by the server
.LP
.IP " *" 3
The status of the server
.LP
.IP " *" 3
For each state, the number of batch jobs in that state and the name
of the state
.LP
.IP " *" 3
Additional implementation-defined information, if any, about the server
.LP
.SH STDERR
.LP
The standard error shall be used only for diagnostic messages.
.SH OUTPUT FILES
.LP
None.
.SH EXTENDED DESCRIPTION
.LP
None.
.SH EXIT STATUS
.LP
The following exit values shall be returned:
.TP 7
\ 0
Successful completion.
.TP 7
>0
An error occurred.
.sp
.SH CONSEQUENCES OF ERRORS
.LP
In addition to the default behavior, the \fIqstat\fP utility shall
not be required to write a diagnostic message to standard
error when the error reply received from a batch server indicates
that the batch \fIjob_identifier\fP does not exist on the
server. Whether or not the \fIqstat\fP utility waits to output the
diagnostic message while attempting to locate the batch job on
other servers is implementation-defined.
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
None.
.SH EXAMPLES
.LP
None.
.SH RATIONALE
.LP
The \fIqstat\fP utility allows users to display the status of jobs
and list the batch jobs in queues.
.LP
The operands of the \fIqstat\fP utility may be either job identifiers,
queues (specified as destination identifiers), or batch
server names. The \fB-Q\fP and \fB-B\fP options, or absence thereof,
indicate the nature of the operands.
.LP
The other options of the \fIqstat\fP utility allow the user to control
the amount of information displayed and the format in
which it is displayed. Should a user wish to display the status of
a set of jobs that match a selection criteria, the \fIqselect\fP utility
may be used to acquire such a list.
.LP
The \fB-f\fP option allows users to request a "full" display in an
implementation-defined format.
.LP
Historically, the \fIqstat\fP utility has been a part of the NQS and
its derivatives, the existing practice on which it is
based.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fIBatch Environment Services\fP, \fIqselect\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .
