Files
oldlinux-files/Ref-docs/POSIX/susv3/utilities/qstat.html
2024-02-19 00:21:47 -05:00

478 lines
14 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
<title>qstat</title>
</head>
<body bgcolor="white">
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
</script>
<basefont size="3"> <a name="qstat"></a> <a name="tag_04_115"></a><!-- qstat -->
<!--header start-->
<center><font size="2">The Open Group Base Specifications Issue 6<br>
IEEE Std 1003.1-2001<br>
Copyright &copy; 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
<!--header end-->
<hr size="2" noshade>
<h4><a name="tag_04_115_01"></a>NAME</h4>
<blockquote>qstat - show status of batch jobs</blockquote>
<h4><a name="tag_04_115_02"></a>SYNOPSIS</h4>
<blockquote class="synopsis">
<div class="box"><code><tt><sup>[<a href="javascript:open_code('BE')">BE</a>]</sup> <img src="../images/opt-start.gif" alt=
"[Option Start]" border="0"> qstat</tt> <b>[</b><tt>-f</tt><b>]</b> <i>job_identifier</i> <tt>...<br>
<br>
qstat -Q</tt> <b>[</b><tt>-f</tt><b>]</b> <i>destination</i> <tt>...<br>
<br>
qstat -B</tt> <b>[</b><tt>-f</tt><b>]</b> <i>server_name</i> <tt>... <img src="../images/opt-end.gif" alt="[Option End]" border=
"0"></tt></code></div>
<tt><br>
</tt></blockquote>
<h4><a name="tag_04_115_03"></a>DESCRIPTION</h4>
<blockquote>
<p>The status of a batch job, batch queue, or batch server is obtained by a request to the server. The <i>qstat</i> 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.</p>
<p>For each successfully processed batch <i>job_identifier</i>, the <i>qstat</i> utility shall display information about the
corresponding batch job.</p>
<p>For each successfully processed destination, the <i>qstat</i> utility shall display information about the corresponding batch
queue.</p>
<p>For each successfully processed server name, the <i>qstat</i> utility shall display information about the corresponding
server.</p>
<p>The <i>qstat</i> utility shall acquire batch job status information by sending a <i>Job Status Request</i> to a batch server.
The <i>qstat</i> utility shall acquire batch queue status information by sending a <i>Queue Status Request</i> to a batch server.
The <i>qstat</i> utility shall acquire server status information by sending a <i>Server Status Request</i> to a batch server.</p>
</blockquote>
<h4><a name="tag_04_115_04"></a>OPTIONS</h4>
<blockquote>
<p>The <i>qstat</i> utility shall conform to the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href=
"../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p>
<p>The following options shall be supported by the implementation:</p>
<dl compact>
<dt><b>-f</b></dt>
<dd>Specify that a full display is produced.
<p>The minimum contents of a full display are specified in the STDOUT section.</p>
<p>Additional contents and format of a full display are implementation-defined.</p>
</dd>
<dt><b>-Q</b></dt>
<dd>Specify that the operand is a destination.
<p>The <i>qstat</i> utility shall display information about each batch queue at each destination identified as an operand.</p>
</dd>
<dt><b>-B</b></dt>
<dd>Specify that the operand is a server name.
<p>The <i>qstat</i> utility shall display information about each server identified as an operand.</p>
</dd>
</dl>
</blockquote>
<h4><a name="tag_04_115_05"></a>OPERANDS</h4>
<blockquote>
<p>If the <b>-Q</b> option is presented to the <i>qstat</i> utility, the utility shall accept one or more operands that conform to
the syntax for a destination (see <a href="xcu_chap03.html#tag_03_03_02"><i>Destination</i></a> ).</p>
<p>If the <b>-B</b> option is presented to the <i>qstat</i> utility, the utility shall accept one or more <i>server_name</i>
operands.</p>
<p>If neither the <b>-B</b> nor the <b>-Q</b> option is presented to the <i>qstat</i> utility, the utility shall accept one or more
operands that conform to the syntax for a batch <i>job_identifier</i> (see <a href="xcu_chap03.html#tag_03_03_01"><i>Batch Job
Identifier</i></a> ).</p>
</blockquote>
<h4><a name="tag_04_115_06"></a>STDIN</h4>
<blockquote>
<p>Not used.</p>
</blockquote>
<h4><a name="tag_04_115_07"></a>INPUT FILES</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_04_115_08"></a>ENVIRONMENT VARIABLES</h4>
<blockquote>
<p>The following environment variables shall affect the execution of <i>qstat</i>:</p>
<dl compact>
<dt><i>HOME</i></dt>
<dd>Determine the pathname of the user's home directory.</dd>
<dt><i>LANG</i></dt>
<dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of
IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> for
the precedence of internationalization variables used to determine the values of locale categories.)</dd>
<dt><i>LC_ALL</i></dt>
<dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
<dt><i>LC_COLLATE</i></dt>
<dd><br>
Determine the locale for the behavior of ranges, equivalence classes, and multi-character collating elements within regular
expressions.</dd>
<dt><i>LC_CTYPE</i></dt>
<dd>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).</dd>
<dt><i>LC_MESSAGES</i></dt>
<dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard
error.</dd>
<dt><i>LC_NUMERIC</i></dt>
<dd><br>
Determine the locale for selecting the radix character used when writing floating-point formatted output.</dd>
</dl>
</blockquote>
<h4><a name="tag_04_115_09"></a>ASYNCHRONOUS EVENTS</h4>
<blockquote>
<p>Default.</p>
</blockquote>
<h4><a name="tag_04_115_10"></a>STDOUT</h4>
<blockquote>
<p>If an operand presented to the <i>qstat</i> utility is a batch <i>job_identifier</i> and the <b>-f</b> option is not specified,
the <i>qstat</i> 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:</p>
<ul>
<li>
<p>The batch <i>job_identifier</i></p>
</li>
<li>
<p>The batch job name</p>
</li>
<li>
<p>The <i>Job_Owner</i> attribute</p>
</li>
<li>
<p>The CPU time used by the batch job</p>
</li>
<li>
<p>The batch job state</p>
</li>
<li>
<p>The batch job location</p>
</li>
</ul>
<p>If an operand presented to the <i>qstat</i> utility is a batch <i>job_identifier</i> and the <b>-f</b> option is specified, the
<i>qstat</i> utility shall display the following items for each success fully processed operand:</p>
<ul>
<li>
<p>The batch <i>job_identifier</i></p>
</li>
<li>
<p>The batch job name</p>
</li>
<li>
<p>The <i>Job_Owner</i> attribute</p>
</li>
<li>
<p>The execution user ID</p>
</li>
<li>
<p>The CPU time used by the batch job</p>
</li>
<li>
<p>The batch job state</p>
</li>
<li>
<p>The batch job location</p>
</li>
<li>
<p>Additional implementation-defined information, if any, about the batch job or batch queue</p>
</li>
</ul>
<p>If an operand presented to the <i>qstat</i> utility is a destination, the <b>-Q</b> option is specified, and the <b>-f</b>
option is not specified, the <i>qstat</i> 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:</p>
<ul>
<li>
<p>The batch queue name</p>
</li>
<li>
<p>The maximum number of batch jobs that shall be run in the batch queue concurrently</p>
</li>
<li>
<p>The total number of batch jobs in the batch queue</p>
</li>
<li>
<p>The status of the batch queue</p>
</li>
<li>
<p>For each state, the number of batch jobs in that state in the batch queue and the name of the state</p>
</li>
<li>
<p>The type of batch queue (execution or routing)</p>
</li>
</ul>
<p>If the operands presented to the <i>qstat</i> utility are destinations, the <b>-Q</b> option is specified, and the <b>-f</b>
option is specified, the <i>qstat</i> utility shall display the following items for each successfully processed operand:</p>
<ul>
<li>
<p>The batch queue name</p>
</li>
<li>
<p>The maximum number of batch jobs that shall be run in the batch queue concurrently</p>
</li>
<li>
<p>The total number of batch jobs in the batch queue</p>
</li>
<li>
<p>The status of the batch queue</p>
</li>
<li>
<p>For each state, the number of batch jobs in that state in the batch queue and the name of the state</p>
</li>
<li>
<p>The type of batch queue (execution or routing)</p>
</li>
<li>
<p>Additional implementation-defined information, if any, about the batch queue</p>
</li>
</ul>
<p>If the operands presented to the <i>qstat</i> utility are batch server names, the <b>-B</b> option is specified, and the
<b>-f</b> option is not specified, the <i>qstat</i> 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:</p>
<ul>
<li>
<p>The batch server name</p>
</li>
<li>
<p>The maximum number of batch jobs that shall be run in the batch queue concurrently</p>
</li>
<li>
<p>The total number of batch jobs managed by the batch server</p>
</li>
<li>
<p>The status of the batch server</p>
</li>
<li>
<p>For each state, the number of batch jobs in that state and the name of the state</p>
</li>
</ul>
<p>If the operands presented to the <i>qstat</i> utility are server names, the <b>-B</b> option is specified, and the <b>-f</b>
option is specified, the <i>qstat</i> utility shall display the following items for each successfully processed operand:</p>
<ul>
<li>
<p>The server name</p>
</li>
<li>
<p>The maximum number of batch jobs that shall be run in the batch queue concurrently</p>
</li>
<li>
<p>The total number of batch jobs managed by the server</p>
</li>
<li>
<p>The status of the server</p>
</li>
<li>
<p>For each state, the number of batch jobs in that state and the name of the state</p>
</li>
<li>
<p>Additional implementation-defined information, if any, about the server</p>
</li>
</ul>
</blockquote>
<h4><a name="tag_04_115_11"></a>STDERR</h4>
<blockquote>
<p>The standard error shall be used only for diagnostic messages.</p>
</blockquote>
<h4><a name="tag_04_115_12"></a>OUTPUT FILES</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_04_115_13"></a>EXTENDED DESCRIPTION</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_04_115_14"></a>EXIT STATUS</h4>
<blockquote>
<p>The following exit values shall be returned:</p>
<dl compact>
<dt>&nbsp;0</dt>
<dd>Successful completion.</dd>
<dt>&gt;0</dt>
<dd>An error occurred.</dd>
</dl>
</blockquote>
<h4><a name="tag_04_115_15"></a>CONSEQUENCES OF ERRORS</h4>
<blockquote>
<p>In addition to the default behavior, the <i>qstat</i> 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 <i>job_identifier</i> does not exist on the
server. Whether or not the <i>qstat</i> utility waits to output the diagnostic message while attempting to locate the batch job on
other servers is implementation-defined.</p>
</blockquote>
<hr>
<div class="box"><em>The following sections are informative.</em></div>
<h4><a name="tag_04_115_16"></a>APPLICATION USAGE</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_04_115_17"></a>EXAMPLES</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_04_115_18"></a>RATIONALE</h4>
<blockquote>
<p>The <i>qstat</i> utility allows users to display the status of jobs and list the batch jobs in queues.</p>
<p>The operands of the <i>qstat</i> utility may be either job identifiers, queues (specified as destination identifiers), or batch
server names. The <b>-Q</b> and <b>-B</b> options, or absence thereof, indicate the nature of the operands.</p>
<p>The other options of the <i>qstat</i> 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 <a href=
"../utilities/qselect.html"><i>qselect</i></a> utility may be used to acquire such a list.</p>
<p>The <b>-f</b> option allows users to request a &quot;full&quot; display in an implementation-defined format.</p>
<p>Historically, the <i>qstat</i> utility has been a part of the NQS and its derivatives, the existing practice on which it is
based.</p>
</blockquote>
<h4><a name="tag_04_115_19"></a>FUTURE DIRECTIONS</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_04_115_20"></a>SEE ALSO</h4>
<blockquote>
<p><a href="xcu_chap03.html#tag_03"><i>Batch Environment Services</i></a> , <a href="qselect.html"><i>qselect</i></a></p>
</blockquote>
<h4><a name="tag_04_115_21"></a>CHANGE HISTORY</h4>
<blockquote>
<p>Derived from IEEE&nbsp;Std&nbsp;1003.2d-1994.</p>
</blockquote>
<h4><a name="tag_04_115_22"></a>Issue 6</h4>
<blockquote>
<p>IEEE PASC Interpretation 1003.2 #191 is applied, removing the following ENVIRONMENT VARIABLES listed as affecting <i>qstat</i>:
<i>COLUMNS ,</i> <i>LINES ,</i> <i>LOGNAME ,</i> <i>TERM ,</i> and <i>TZ .</i></p>
<p>The <i>LC_TIME</i> entry is also removed from the ENVIRONMENT VARIABLES section.</p>
</blockquote>
<div class="box"><em>End of informative text.</em></div>
<hr>
<hr size="2" noshade>
<center><font size="2"><!--footer start-->
UNIX &reg; is a registered Trademark of The Open Group.<br>
POSIX &reg; is a registered Trademark of The IEEE.<br>
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
]</font></center>
<!--footer end-->
<hr size="2" noshade>
</body>
</html>