.\" Copyright (C) 1994-2018 Altair Engineering, Inc.
.\" For more information, contact Altair at www.altair.com.
.\"
.\" This file is part of the PBS Professional ("PBS Pro") software.
.\"
.\" Open Source License Information:
.\"
.\" PBS Pro is free software. You can redistribute it and/or modify it under the
.\" terms of the GNU Affero General Public License as published by the Free
.\" Software Foundation, either version 3 of the License, or (at your option) any
.\" later version.
.\"
.\" PBS Pro is distributed in the hope that it will be useful, but WITHOUT ANY
.\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
.\" FOR A PARTICULAR PURPOSE.
.\" See the GNU Affero General Public License for more details.
.\"
.\" You should have received a copy of the GNU Affero General Public License
.\" along with this program. If not, see .
.\"
.\" Commercial License Information:
.\"
.\" For a copy of the commercial license terms and conditions,
.\" go to: (http://www.pbspro.com/UserArea/agreement.html)
.\" or contact the Altair Legal Department.
.\"
.\" Altair’s dual-license business model allows companies, individuals, and
.\" organizations to create proprietary derivative works of PBS Pro and
.\" distribute them - whether embedded or bundled with other software -
.\" under a commercial license agreement.
.\"
.\" Use of Altair’s trademarks, including but not limited to "PBS™",
.\" "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
.\" trademark licensing policies.
.\"
.TH qterm 8B "16 April 2018" Local "PBS Professional"
.SH NAME
.B qterm
\- terminate one or both PBS servers, and optionally terminate scheduler(s) and/or MoMs
.SH SYNOPSIS
.B qterm
[-f | -F | -i] [-m] [-s] [-t ] [[ ...]]
.br
.B qterm
--version
.SH DESCRIPTION
The
.B qterm
command terminates a PBS batch server.
Once the server is terminating, no new jobs are accepted by the
server, and no jobs are allowed to begin execution. The impact on
running jobs depends on the way the server is shut down.
The
.B qterm
command does not exit until the server has completed its shutdown procedure.
If the complex is configured for failover, and the primary server is
shut down, the normal behavior for the secondary server is to become
active. The
.B qterm
command provides options to manage the behavior of
the secondary server; it can be shut down, forced to remain idle, or
shut down in place of the primary server.
.B Required Privilege
.br
In order to
run the
.B qterm
command, you must have PBS Operator or Manager privilege.
.SH OPTIONS
.IP "(no options)" 10
The
.B qterm
command defaults to
.B qterm -t quick.
.IP "-f" 10
If the complex is configured for failover, shuts down both the primary and
secondary servers.
.br
Without the
.I -f
option,
.B qterm
shuts down the the primary server and makes the secondary server active.
.br
The
.I -f
option cannot be used with the
.I -i
or
.I -F
options.
.IP "-F" 10
If the complex is configured for failover, shuts down only the secondary server,
leaving the primary server active.
.br
The
.I -F
option cannot be used with the
.I -f
or
.I -i
options.
.IP "-i" 10
If the complex is configured for failover, leaves the secondary server
idle when the primary server is shut down.
.br
The
.I -i
option cannot be used with the
.I -f
or
.I -F
options.
.IP "-m" 10
Shuts down the primary server and all MoMs
.B (pbs_mom).
This option does not cause jobs or subjobs to be killed.
Jobs are left running subject to other options to the
.B qterm
command.
.IP "-s" 10
Shuts down the primary server and the scheduler
.B (pbs_sched).
.IP "-t " 10
The
.I type
specifies how the server is shut down. The
.I types
are the following:
.RS
.IP immediate
Shuts down the primary server. Immediately stops all running jobs.
Any running jobs that can be checkpointed are checkpointed,
terminated, and requeued. Jobs that cannot be checkpointed are
terminated and requeued if they are rerunnable, otherwise they are
killed.
If any job cannot be terminated, for example the server cannot contact
the MoM of a running job, the server continues to execute and the job
is listed as running. The server can be terminated by a second
.B qterm -t immediate
command.
While terminating, the server is in the
.I Terminating
state.
.IP delay
Shuts down the primary server. The server waits to terminate until
all non-checkpointable, non-rerunnable jobs are finished executing.
Any running jobs that can be checkpointed are checkpointed,
terminated, and requeued. Jobs that cannot be checkpointed are
terminated and requeued if they are rerunnable, otherwise they are
allowed to continue to run.
While terminating, the server is in the
.I Terminating-Delayed
state.
.IP quick
Shuts down the primary server. Running jobs and subjobs are left running.
This is the default behavior when no options are given to the
.B qterm
command.
While terminating, the server is in the
.I Terminating
state.
.RE
.LP
.IP "--version" 10
The
.B qterm
command returns its PBS version information and exits.
This option can only be used alone.
.SH OPERANDS
You optionally specify the list of servers to shut down using
.I [[ ...].
If you do not specify any servers, the
.B qterm
command shuts down the default server.
.SH STANDARD ERROR
The
.B qterm
command writes a diagnostic message to standard error for
each error occurrence.
.SH EXIT STATUS
.IP Zero 8
Upon successful processing of all operands presented to the
.B qterm
command.
.IP "Greater than zero" 8
If the
.B qterm
command fails to process any operand
.SH SEE ALSO
The
.I PBS Professional Administrator's Guide,
pbs_server(8B), pbs_mom(8B), pbs_sched(8B)