.TH uustat "" "" "Command"
.PC "UUCP status inquiry and control"
.fi
\fBuustat
[\-eKiMNQ]
[\-B \fIlines\^\fB]
[\-cC \fIcommand\^\fB]
[\-o \fIhours\^\fB]
[\-sS \fIsystem\^\fB]
[\-uU \fIuser\^\fB]
[\-y \fIhours\^\fB]\fR
.br
.B "uustat \-a"
.br
\fBuustat [\-k \fIjobid\^\fB] [\-r \fIjobid\^\fB]\fR
.br
\fBuustat \-m\fR
.br
\fBuustat \-p\fR
.br
\fBuustat \-q\fR
.PP
.HS
.SH Options:
.IC \fB\-a\fR
List queued requests to transfer files
.IC "\fB\-C \fIcommand\fR"
List all jobs except those requesting execution of
.I command
.IC "\fB\-c \fIcommand\fR"
List every job that requests the execution of
.I command
.IC \fB\-e\fR
List requests queued to execute a program on a remote system
.IC "\fB\-I \fIfile\fR"
Read configuration information from
.I file
.IC \fB\-i\fR
For each listed job, prompt whether to kill the job
.IC \fB\-K\fR
Automatically kill each listed job
.IC "\fB\-k \fIjobid\fR"
Kill the job with the identifier
.I jobid
.IC \fB\-M\fR
For each job, send mail to \*(UU administrator
.IC \fB\-m\fR
Display status of conversations for all remote systems
.IC \fB\-N\fR
For each job, send mail to user who requested job
.IC "\fB\-o \fIhours\fR"
List all jobs that have been queued longer than
.I hours
.IC \fB\-p\fR
Display status of processes holding \*(UU locks
.IC \fB\-Q\fR
Work quietly
.IC \fB\-q\fR
Display status of commands, executions, and conversations for all remote systems
.IC "\fB\-r \fIjobid\fR"
Rejuvinate the job with job identifier
.I jobid
.IC "\fB\-S \fIsystem\fR"
List all jobs except ones queued for
.I system
.IC "\fB\-s \fIsystem\fR"
List every job queued for
.I system
.IC "\fB\-U \fIuser\fR"
List all jobs except ones queued for
.I user
.IC "\fB\-u \fIuser\fR"
List every job queued for
.I user
.IC \fB\-W\fR
Specify comment to include in mail sent with options
.B \-M
or
.B \-N
.IC "\fB\-x \fItype\fR"
Turn on particular types of debugging
.IC "\fB\-y \fIhours\fR"
List all jobs queued less than
.I hours
.HE
The command
.B uustat
displays status information about the \*(UU system.
You can also use it to cancel or rejuvinate requests made by via commands
.B uucp
or
.BR uux .
.PP
By default,
.B uustat
displays every job queued by the user who invokes this command.
If the command line includes any of the options
.BR \-a ,
.BR \-e ,
.BR \-s ,
.BR \-S ,
.BR \-u ,
.BR \-U ,
.BR \-c ,
.BR \-C ,
.BR \-o ,
or
.BR \-y ,
then
.B uustat
displays information about all of the jobs that match given specifications.
.PP
The option
.B \-K
can be used to kill a selected group of jobs, such as all
jobs more than seven days old.
.SH "Command-line Options"
.B uustat
recognizes the following command-line options:
.IP \fB\-a\fR
List all queued requests to transfer files.
.IP "\fB\-C \fIcommand\fR"
List all jobs except those that request the execution of
.IR command .
If
.I command
is
.BR ALL ,
list all jobs that simply request a file transfer (as opposed to
requesting the execution of some command).
You cannot use this option with the option
.BR \-c .
A
.B uustat
command can hold more than one
.B \-C
option.
.IP "\fB\-c \fIcommand\fR"
List every job that requests the execution of
.IR command .
If
.I command
is
.BR ALL ,
.B uustat
lists all jobs that request the execution of a command
(as opposed to simply requesting a file transfer).
A
.B uustat
command can hold more than one
.B \-c
option.
.IP \fB\-e\fR
List queued requests to execute a program on a remote system,
rather than queued requests to transfer files.
Queued execution requests are processed by
.B uuxqt
rather than
.BR uucico .
A queued execution request may await a file
from a remote system.
These requests are created by an invocation of the command
.BR uux .
.IP "\fB\-I \fIfile\fR"
Read configuration information from
.I file
instead of from the default file
.BR /usr/lib/uucp/sys .
.IP \fB\-i\fR
For each listed job, prompt whether to kill the job.
If the first character of the input line is
.B y
or
.BR Y ,
the job will be killed.
.IP \fB\-K\fR
Kill each listed job without prompting for permission.
This can be used in a script to clean up obsolete jobs automatically.
.IP "\fB\-k \fIjobid\fR"
Kill the job with the identifier
.IR jobid .
A job's identifier is shown by the default output format, as well as by the
commands
.B uucp
or
.B uux
when invoked with option
.BR \-j .
A job may only be killed only by the user who created the job,
the \*(UU administrator, or the superuser
.BR root .
You can use the option
.B \-k
more than once on a
.B uustat
command line, to kill several jobs simultaneously.
.IP \fB\-M\fR
For each listed job, send mail to the \*(UU administrator.
If the job is killed (due to
.B \-K
or
.B \-i
with an affirmative response), the mail will indicate that.
A comment specified by the
.B \-W
option may be included.
If the job is an execution, the initial
portion of its standard input will be included in the mail message;
the number of lines to include may be set with the
.B \-B
option (the default is 100).
If the standard input contains null characters,
it is assumed to be a binary file and is not included.
.IP \fB\-m\fR
Display the status of conversations for all remote systems.
.IP \fB\-N\fR
For each listed job, send mail to the user who requested the job.
The mail is identical to that sent by the option
.BR \-M .
.IP "\fB\-o \fIhours\fR"
List all jobs that have been queued longer than
.IR hours .
.IP \fB\-p\fR
Display the status of all processes holding \*(UU locks on systems or ports.
.IP \fB\-Q\fR
Work quietly:
Do not list the job, just perform the actions indicated by the options
.BR \-i ,
.BR \-K ,
.BR \-M ,
or
.BR \-N .
.IP \fB\-q\fR
Display the status of commands, executions, and conversations for all
remote systems for which commands or executions are queued.
.IP "\fB\-r \fIjobid\fR"
Rejuvinate the job with job identifier
.IR jobid .
This marks the job as having been invoked at the current time; which, in
turn, affects the output of the options
.B \-o
or
.B \-y
and preserves the job from any automated cleanup daemon.
The job identifier is shown by the default output format,
as well as by the commands
.B uucp
and
.B uux
when invoked with option
.BR \-j .
A job may only be rejuvenated by the user who created the job,
by the \*(UU administrator, or the superuser
.BR root .
You can use the option
.B \-r
more than once on a
.B uustat
command line, to rejuvinate several jobs simultaneously.
.IP "\fB\-S \fIsystem\fR"
List all jobs except the ones queued for
.IR system .
You cannot use this option with the option
.BR \-s .
A
.B uustat
command can hold more than one
.B \-S
option.
.IP "\fB\-s \fIsystem\fR"
List every job queued for
.IR system .
A
.B uustat
command can hold more than one
.B \-s
option.
.IP "\fB\-U \fIuser\fR"
List all jobs except the ones queued for
.IR user .
You cannot use this option with the option
.BR \-u .
A
.B uustat
command can hold more than one
.B \-U
option.
.IP "\fB\-u \fIuser\fR"
List every job queued for
.IR user .
A
.B uustat
command can hold more than one
.B \-u
option.
.IP \fB\-W\fR
Specify a comment to be included in mail sent with the
.B \-M
or
.B \-N
options.
.IP "\fB\-x \fItype\fR"
Turn on particular debugging types.
The following types are recognized:
.DS
.B
.ta 0.5i 2.0i 3.5i
	abnormal	chat	config
	execute	handshake	incoming
	outgoing	port	proto
	spooldir	uucp-proto
.DE
.IP
Only
.BR abnormal ,
.BR config ,
.BR spooldir ,
and
.B execute
are meaningful for
.BR uustat .
.IP
Multiple types may be given, separated by commas, and the
.B \-x
option can appear multiple times on the
.B uustat
command line.
A number may also be given, which
will turn on that many types from the foregoing list; for example,
.B "\-x 2"
is equivalent to
.BR "\-x abnormal,chat" .
.IP "\fB\-y \fIhours\fR"
List all jobs that have been queued less than
.IR hours .
.SH Examples
The first example displays the status of all jobs:
.DM
	uustat -a
.DE
.PP
The output has the format:
.DS
	\fIjobid system user queue-date command (size)\fR
.DE
.PP
The job identifier may be passed to the options
.B \-k
or
.BR \-r .
The size indicates how much data is to be transferred to the remote system,
and is absent for a file-receive request.
The options
.BR \-s ,
.BR \-S ,
.BR \-u ,
.BR \-U ,
.BR \-c ,
.BR \-C ,
.BR \-o ,
and
.B \-y
may be used to control which jobs are listed.
.PP
The next example displays the status of queued execution requests:
.DM
	uustat -e
.DE
.PP
The output has the format:
.DS
	\fIsystem requestor queue-date command\fR
.DE
.PP
The options
.B \-s,
.B \-S,
.B \-u,
.B \-U,
.B \-c,
.B \-C,
.B \-o,
and
.B \-y
can be used to control which requests are listed.
.PP
The next example displays
the status for all systems with queued commands:
.DM
	uustat -q
.DE
.PP
This displays the system,
the number of commands queued for it,
the age of the oldest queued command,
the number of queued local executions,
the age of the oldest queued execution,
the date of the last conversation,
and the status of that conversation.
.PP
The next example
displays conversation status for all remote systems:
.DM
	uustat -m
.DE
.PP
The output gives the system, the date of the last conversation,
and the status of that conversation.
If the last conversation failed,
.B uustat
indicates how many attempts have been made to call the system.
If the retry period is preventing calls to that system,
.B uustat
also displays the time when the next call will be permitted.
.PP
The next example
displays the status of all processes that hold \*(UU locks:
.DM
	uustat -p
.DE
.PP
The output is exactly the same as that of the command
.B ps
for each process that holds a lock.
.PP
The next example kills all
.B rmail
commands that have been queued up waiting for delivery for over one week
(168 hours).
.DM
	uustat -c rmail -o 168 -K -Q -M -N -W"Queued for over 1 week"
.DE
.PP
.B uustat
sends mail both to the \*(UU administrator and to the user who requested the
.B rmail
execution.
The mail message includes the string given by the
.B \-W
option.
The option
.B \-Q
prevents any of the jobs from being listed on the terminal, so
any output from the program will be error messages.
.SH Files
\fB/usr/lib/uucp/config\fR \(em Configuration file.
.br
\fB/usr/spool/uucp\fR \(em \*(UU spool directory.
.SH "See Also"
.Xr "commands," commands
.Xr "ps," ps
.Xr "rmail," rmail
.Xr "uucico," uucico
.Xr "UUCP," uucp
.Xr "uucp," uucp.c
.Xr "uux," uux
.Xr "uuxqt" uuxqt
.SH Notes
.II "Taylor, Ian Lance"
.B uustat
was written by Ian Lance Taylor (ian@airs.com).
