torque_install/torque/doc/man8/pbs_sched_cc.8.in
ruoyunbai 2bb9621e30 1
2021-09-29 21:06:16 +08:00

212 lines
9.3 KiB
Groff

.\" OpenPBS (Portable Batch System) v2.3 Software License
.\"
.\" Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
.\" All rights reserved.
.\"
.\" ---------------------------------------------------------------------------
.\" For a license to use or redistribute the OpenPBS software under conditions
.\" other than those described below, or to purchase support for this software,
.\" please contact Veridian Systems, PBS Products Department ("Licensor") at:
.\"
.\" www.OpenPBS.org +1 650 967-4675 sales@OpenPBS.org
.\" 877 902-4PBS (US toll-free)
.\" ---------------------------------------------------------------------------
.\"
.\" This license covers use of the OpenPBS v2.3 software (the "Software") at
.\" your site or location, and, for certain users, redistribution of the
.\" Software to other sites and locations. Use and redistribution of
.\" OpenPBS v2.3 in source and binary forms, with or without modification,
.\" are permitted provided that all of the following conditions are met.
.\" After December 31, 2001, only conditions 3-6 must be met:
.\"
.\" 1. Commercial and/or non-commercial use of the Software is permitted
.\" provided a current software registration is on file at www.OpenPBS.org.
.\" If use of this software contributes to a publication, product, or service
.\" proper attribution must be given; see www.OpenPBS.org/credit.html
.\"
.\" 2. Redistribution in any form is only permitted for non-commercial,
.\" non-profit purposes. There can be no charge for the Software or any
.\" software incorporating the Software. Further, there can be no
.\" expectation of revenue generated as a consequence of redistributing
.\" the Software.
.\"
.\" 3. Any Redistribution of source code must retain the above copyright notice
.\" and the acknowledgment contained in paragraph 6, this list of conditions
.\" and the disclaimer contained in paragraph 7.
.\"
.\" 4. Any Redistribution in binary form must reproduce the above copyright
.\" notice and the acknowledgment contained in paragraph 6, this list of
.\" conditions and the disclaimer contained in paragraph 7 in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" 5. Redistributions in any form must be accompanied by information on how to
.\" obtain complete source code for the OpenPBS software and any
.\" modifications and/or additions to the OpenPBS software. The source code
.\" must either be included in the distribution or be available for no more
.\" than the cost of distribution plus a nominal fee, and all modifications
.\" and additions to the Software must be freely redistributable by any party
.\" (including Licensor) without restriction.
.\"
.\" 6. All advertising materials mentioning features or use of the Software must
.\" display the following acknowledgment:
.\"
.\" "This product includes software developed by NASA Ames Research Center,
.\" Lawrence Livermore National Laboratory, and Veridian Information
.\" Solutions, Inc.
.\" Visit www.OpenPBS.org for OpenPBS software support,
.\" products, and information."
.\"
.\" 7. DISCLAIMER OF WARRANTY
.\"
.\" THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
.\" ARE EXPRESSLY DISCLAIMED.
.\"
.\" IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
.\" U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
.\" OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" This license will be governed by the laws of the Commonwealth of Virginia,
.\" without reference to its choice of law rules.
.if \n(Pb .ig Iq
.TH pbs_sched 8B "" Local PBS
.so ../ers/ers.macros
.Iq
.SH NAME
pbs_sched_cc \- pbs C scheduler
.SH SYNOPSIS
pbs_sched [\^\-a\ alarm\^] [\^\-d\ home\^]
[\^\-L\ logfile\^] [\^\-p\ file\^] [\^\-S\ port\^] [\^\-R\ port\^] [\^\-c\ file\^]
.SH DESCRIPTION
The
.B pbs_sched
program runs in conjunction with the PBS server. It queries the
server about the state of PBS and communicates with
.B pbs_resmon
to get information about the status of running jobs, memory available etc.
It then makes decisions as to what jobs to run.
.LP
pbs_sched must be executed with root permission.
.SH OPTIONS
.IP "\-a alarm" 15
This specifies the time in seconds to wait for a schedule run to finish.
If a script takes too long to finish, an alarm signal is sent, and
the scheduler is restarted. If a core file does not exist in the
current directory,
.B abort()
is called and a core file is generated. The default for
.I alarm
is 180 seconds.
.IP "\-d home" 15
This specifies the PBS home directory, PBS_HOME.
The current working directory of the scheduler is PBS_HOME/sched_priv.
If this option is not given, PBS_HOME defaults to $PBS_SERVER_HOME as defined
during the PBS build procedure.
.IP "\-L logfile" 15
Specifies an absolute path name of the file to use as the log file.
If not specified, the scheduler will
open a file named for the current date in the PBS_HOME/sched_logs
directory (see the \-d option).
.IP "\-p file" 15
This specifies the "print" file. Any output from the C
code which is written to standard out or standard error will be
written to this file.
If this option is not given, the file used will be
.I PBS_HOME/sched_priv/sched_out .
See the
.At \-d
option.
.IP "\-S port" 15
This specifies the port to use. If this option is not given,
the default port for the PBS scheduler is used.
.IP "\-R port" 15
This specifies the resource monitor port to use. If this option is not given,
the default port for the PBS mom is used. NOTE: this option only makes the
mom port available to the scheduler writer. It doesn't force them to use it.
.IP "\-c file" 15
Specify a configuration file, see description below.
If this is a relative file name it will be relative to PBS_HOME/sched_priv,
see the \-d option. If the \-c option is not supplied, pbs_sched will not
attempt to open a configuration file.
.LP
The options that specify file names may be absolute or relative.
If they are relative, their root directory will be PBS_HOME/sched_priv.
.LP
.SH USAGE
This version of the scheduler requires knowledge of the C
language and the PBS API. Source code is provided for a main program for
the scheduler. The site must supply the heart of the program.
When invoked, the main program performs general initialization
and housekeeping chores. Then a locally supplied function,
.I schedinit()
is called to perform site specific initialization.
.LP
In the main loop, a locally supplied function,
.I schedule()
is called to make the scheduling decisions and perform any required
actions.
Information about jobs and queues is obtained from the Server through
the standard PBS API as found in libifl.a.
Information about the execution host(s) is obtained from the Resource Monitor.
Routines to communicate with the Resource Monitor are found in libnet.a.
.LP
If the processing takes more than the allotted time, the scheduler
will restart itself. The default amount of time is three minutes. This
can be changed with the \-a option.
.LP
On receipt of a SIGHUP signal, the scheduler will close and reopen
its log file and reread its configuration file (if any).
.SH CONFIGURATION FILE
A configuration file may be specified with the \-c option.
This file may be used to specify the hosts (servers) which are allowed to
connect to pbs_sched. The hosts are specified in the configuration file
in a manor identical to that used in pbs_mom.
.IP clienthost
One or more servers, one per line, may be specified:
.IP
.Ty "$clienthost hostname"
+.IP restricted
Allows connections from non-priviledged ports on the named hosts. Typically
only used with Mac OSX:
.IP
.Ty "$restricted hostname"
.IP
Two host names are always allowed to connection to pbs_sched, "localhost"
and the name returned to pbs_sched by the system call gethostname(). These
names need not be specified in the configuration file.
.LP
The configuration file must be "secure". It must be owned by a user id and
group id less than 10 and not be world writable.
.LP
.SH FILES
.IP $PBS_SERVER_HOME/sched_priv 10
the default directory for configuration files, typically
(/usr/spool/pbs)/sched_priv.
.LP
.SH Signal Handling
A C based scheduler will handle the following signals:
.IP SIGHUP
The server will close and reopen its log file and reread the config file
if one exists.
.IP SIGALRM
If the site supplied scheduling module exceeds the time limit, the Alarm
will cause the scheduler to attempt to core dump and restart itself.
.IP "SIGINT and SIGTERM"
Will result in an orderly shutdown of the scheduler.
.LP
All other signals have the default action installed.
.SH "EXIT STATUS"
Upon normal termination, an exit status of zero is returned.
.SH "SEE ALSO"
pbs_sched_tcl(8B), pbs_server(8B), and pbs_mom(8B).
.br
PBS Internal Design Specification
.\" turn off any extra indent left by the Sh macro
.RE