\documentstyle[11pt]{article}
%\pagestyle{empty}
\parindent=0pt
\parskip=0.5\baselineskip
\oddsidemargin=0.25in
\textwidth=6in
\textheight=8in
\begin{document}

\vspace*{-1.5in}
\begin{center}
{\LARGE\bf SYSTAT}

{\large\bf A System Status Program}

\end{center}

\vspace{\baselineskip}
The SYSTAT program is run using the {\tt SYSTAT} command.  The {\tt SYSTAT}
command is a foreign command of the form:
\begin{verbatim}
    $ SY*STAT == "$dev:[dir]SYSTAT.EXE"
\end{verbatim}
It may be installed with WORLD privilege.

Command syntax:
\begin{verbatim}
             Qualifiers and Parameters:    Defaults:         Min. Abbr:
    $ SYSTAT [/NODE[=nodename]]            /NODE=ADMIN*      /N[=]
             [/IMAGE[=imagename]]          /IMAGE=*          /I[=]
             [/[NO]RIGHTS]                 /NORIGHTS         /RI  /NOR
             [/[NO]IO]                     /NOIO             /IO  /NOIO
             [/[NO]PROCESS_NAME[=prcnam]]  /NOPROCESS_NAME   /PR  /NOP
             [/[NO]INTERACTIVE]            /INTERACTIVE      /IN  /NOI
             [/[NO]BATCH]                  /BATCH            /BA  /NOB
             [/[NO]NETWORK]                /NONETWORK        /NE  /NON
             [/[NO]OTHER]                  /NOOTHER          /OT  /NOO
             [username]                    (all)
\end{verbatim}

\begin{description}
\item[{\tt /NODE}] may be used to specify the node name.  If it is omitted,
	the first five characters of the current nodename with an asterisk
	appended is used as the default.  If it is specified with no value,
	only the current node is used.  If a username is specified, the
	default changes to all nodes.  Only nodes which are members of the
	same cluster as the system on which the command is given are valid.
\item[{\tt /IMAGE}] may be used to include only processes running that
	image.  If no value is given, processes with no image (running
	the CLI) will be included.  Wildcards may be used.  The default
	is to show processes regardless of the image they are running.
\item[{\tt /RIGHTS}] includes currently enabled process rights for each
	process.  This
	is the only qualifier which will result in greater than 80 column
	output.  The display is designed so that a wrap at column 80 will
	show the first line of rights information starting in column 2.
	Certain ``usual'' rights are filtered from the list: Interactive,
	Batch, Network, Local, and the UIC identifier if it matches the
	username.  Other process rights that the system automatically adds
	remain.  These include Dialup and Remote. {\tt /NORIGHTS} is the
	default.
\item[{\tt /IO}] may be used to substitute the buffered and direct IO
	counts for the global and total memory in use information.
	{\tt /NOIO} is the default.
\item[{\tt /PROCESS\_NAME}] may be used to substitute the process name for
	the time information.  Both the elapsed and CPU time will be replaced
	by the process name.  In addition, a value may be specified.  This
	will be compared against a compressed and uppercased version of the
	process name.  Wildcards may be used.  {\tt /NOPROCESS\_NAME} is the
	default.
\item[{\tt /INTERACTIVE}] includes mode interactive processes.
	{\tt /INTERACTIVE} is the default.
\item[{\tt /BATCH}] includes mode batch processes.
	{\tt /BATCH} is the default.
\item[{\tt /NETWORK}] includes mode network processes.
	{\tt /NONETWORK} is the default.
\item[{\tt /OTHER}] includes mode other (detached) processes.
	{\tt /NOOTHER} is the default.
\item[{\tt username}] includes only processes for this user.  You may use
	wildcards (``{\tt *}'' or ``{\tt \%}'').  Note that if a username
	is specified, the default for {\tt /NODE} is changed to {\tt /NODE=*}.
        Thus, \verb|$ SYSTAT *| is not equivalent to \verb|$ SYSTAT|, but to
        \verb|$ SYSTAT/NODE=*|.\footnote{Actually, it's not quite this, either,
	because the swapper process has no username, and will not match a
	username wildcard.  It will show up when {\tt /OTHER} is specified
	with no username to match.}  Also note that there is no implicit
	wildcard at the end; ``SMITH'' will match ``SMITH'' but not ``SMITHJ''
	as \verb|SHOW USERS| would.\footnote{I consider this a feature. It
	would be easy to make the program work the other way, but then you
	couldn't limit to a specific username if there were others that
	started with that name.  I prefer ``\verb|SYSTAT SMITH*|'' to match
	all usernames starting with ``SMITH''.}  Also, unlike
	\verb|SHOW USERS|, wildcards work for any part of the username.
\end{description}

An example:
{\small
\begin{verbatim}
$ SYSTAT
-------- System Status on Node(s) ADMIN* at 02:33 PM, 09-Apr-91 --------

  PID    Username Elapsed-Time  CPU-Time  State M   Gbl/Mem   Image
20C00348 CHARLIE       0 06:27 0 00:01:07 CUR   I   111/462   TYPE
20C00349 CHARLIE       0 06:27 0 00:00:34 HIB  sI  1362/3945  TPU
20C00504 LINUS         0 00:17 0 00:00:06 LEF   I    80/367
20C0047E LUCY          0 01:59 0 00:00:25 CUR   I   189/1270  SYSTAT
20C004F7 SNOOPY        0 00:19 0 00:00:06 HIB   I   123/406
20C004F9 SNOOPY        0 00:19 0 00:00:11 LEF  sI  1064/2593  TPU
20E001BF WOODSTOCK     1 22:36 0 00:02:44 LEF   I   155/467
20C003EF ZASUPITTS     0 04:04 0 00:00:33 LEF   I   290/1154  CSWING
20C004EA ZASUPITTS     0 00:32 0 00:00:08 HIB  sI  1098/2393  TPU

-----  9 records:  9 Interactive  0 Batch  0 Network  0 Other  -----
\end{verbatim}
}% end \small

Processes are sorted by username, mode, and elapsed time such that the
oldest interactive process for a user is shown first.
Most items are self-explanatory.
Elapsed time is in \verb|d hh:mm| format,
and CPU time is \verb|d hh:mm:ss|.  A small ``{\tt s}'' before the process
mode indicates that the process is a subprocess.  The modes are {\tt I} for
interactive, {\tt B} for batch, {\tt N} for network, and {\tt O} for other
(detached).  The numbers under ``\verb|Gbl|'' are the number of pages of
global (shared) memory mapped by that process's working set.  The numbers
under ``\verb|Mem|'' are the total number of pages (including global) in
the process's working set.  If IO statistics are selected, the memory is
replaced by ``{\tt BIO}'' for the buffered IO count and ``{\tt DIO}'' for
the direct IO count.  The IO counts are since process creation.
  If the image is blank, the CLI (usually DCL)
is running.  Blanks in other fields indicates that the information was not
available at the time it was requested.  A table of possible process states
follows.\footnote{Actually, ``MUTEX'' and all the ones beginning with ``RW''
are not process states, but types of the ``MWAIT'' state.  I have replaced the
generic ``MWAIT'' state with the type of wait as \verb|SHOW SYSTEM| also does.}

{\small\sf
$$
\begin{tabular}{ll}
State & Description \\\hline
CEF   & Common event flag wait \\
COM   & Computable (waiting to run)\\
COMO  & Computable, outswapped \\
CUR   & Current (running)\\
COLPG & Collided page wait \\
FPG   & Free page wait \\
HIB   & Hibernate wait \\
HIBO  & Hibernate wait, outswapped \\
LEF   & Local event flag wait (normal I/O wait)\\
LEFO  & Local event flag wait, outswapped \\
MUTEX & Mutex wait \\
MWAIT & Miscellaneous resource wait \\
PFW   & Page fault wait \\
RWAST & AST wait (also catch-all for MWAIT) \\
RWCLU & Cluster transition wait \\
RWCAP & CPU capability wait \\
RWCSV & Cluster server process wait \\
RWQUO & Job pooled quota \\
RWMBX & Mailbox full wait \\
RWMPB & Modified page writer busy wait \\
RWMPE & Modified page list empty wait \\
RWNPG & Nonpaged dynamic memory wait \\
RWPAG & Paged dynamic memory wait \\
RWSCS & Distributed lock manager wait \\
SUSP  & Suspended \\
SUSPO & Suspended, outswapped \\
\end{tabular}
$$}
\end{document}
