jsv (1) - Linux Manuals
jsv: xxQS_NAMExx Job Submission Verifier
NAME
JSV - xxQS_NAMExx Job Submission Verifier
DESCRIPTION
JSV is an abbreviation for Job Submission Verifier. A JSV is a script or binary that can be used to verify, modify or reject a job during job submission.JSVs will be triggered by submit clients like qsub, qrsh, qsh and qmon on submit hosts (Client JSV), or they verify incoming jobs on the master host (Server JSV), or both.
CONFIGURATION
JSVs can be configured in various locations. Either a jsv_url can be provided with the -jsv submit parameter during job submission, a corresponding switch can be added to one of the sge_request files, or a jsv_url can be configured in the global cluster configuration of the xxQS_NAMExx installation.All defined JSV instances will be executed in following order:
The Client JSVs (1-3) can be defined by xxQS_NAMExx end users, whereas the
client JSV defined in the global sge_request file (4) and the server JSV (5)
can only be defined by the xxQS_NAMExx administrators.
Due to the fact that (4) and (5) are defined and configured by xxQS_NAMExx
administrators and executed as the last JSV instances in
the sequence of JSV scripts, an administrator has a way
to enforce certain policies for a cluster.
However, note that (4) may be over-ridden trivially with
qsub -clear.
As soon as one JSV instance rejects a job the whole process of verification
is stopped and the end user will get a corresponding error message
that the submission of the job has failed.
If a JSV accepts a job, or accepts a job after it applied several
modifications, then the following JSV instance will get the job parameters
including all modifications as input for the verification process.
This is done as long as either the job is accepted or rejected.
Find more information on how to use Client JSVs in
and for Server JSVs in
Client JSV instances are started by client applications before a
job is sent to qmaster. This instance does the job verification for
the job to be submitted. After that verification the JSV process
is stopped.
Server JSV instances are started for each worker thread part of the
qmaster process. (For version 6.2 of xxQS_NAMExx this means that two
processes are started.) Each of those processes has to verify
job parameters for multiple jobs as long as the master is running,
the underlying JSV configuration is not changed, and no error occurs.
In general, commands which are exchanged between a JSV and client/qmaster
have following format. Commands and arguments are case sensitive. Find
the EBNF command description below.
A command starts with a command_name followed by a space
character and a space-separated list of arguments.
JSV instances modify the set of environment variables by sending back
env_commands, and by using the modifiers ADD, MOD,
and DEL.
Multiple param_commands will be sent to a JSV instance after
the JSV has sent a started_command. The sum of all param_commands
sent represents a job specification of the job which should be verified.
submit_parameters are, for example, b (similar to the qsub -b switch), or
masterq (similar to qsub -masterq switch). Find a complete list of
submit_parameters in the
man page. Please note that
the param_parameter name and the corresponding value format
is not equivalent to the qsub switch name and its argument format in
all cases.
E.g. the qsub -pe parameters will by available as a set of parameters
with the name pe_name, pe_min, pe_max and the switch combination
-soft -l will be passed to JSV scripts as l_soft parameter. For
details concerning these differences consult also the
man page.
The job environment is not passed to JSV instances by default because
the job environment of the end user might contain data which
might be interpreted wrongly in the JSV context, and might therefore
cause errors or security issues.
Data in the first column are sent from the client/qmaster to the
JSV instance. Data contained in the second column are sent from
the JSV script to the client/qmaster. Newline characters
which terminate each line in the communication protocol are omitted.
LIFETIME
A Client or Server JSV is started as own process. This process
communicates either with a xxQS_NAMExx client process or the master daemon by
exchanging commands, job parameters, and other data via
stdin/stdout streams.
TIMEOUT
The timeout is a modifiable value that will measure the response time of either
the client or server JSV. In the event that the response time of the JSV is longer
than timeout value specified, this will result in the JSV being re-started. The
server JSV timeout value is specified through the qmaster parameter
jsv_timeout.
The client JSV timeout value is set through the environment variable
SGE_JSV_TIMEOUT. The default value is 10 seconds, and this value must be greater
than 0. If the timeout has been reached, the JSV will only try to re-start once,
and if the timeout is reached again, an error will occur.
THRESHOLD
The threshold value is defined as a qmaster parameter
jsv_threshold.
This value
measures the time for a server job verification. If this time exceeds the defined
threshold then additional logging will appear in the master message file at the
INFO level. This value is specified in milliseconds and has a default value of
5000. If a value of 0 is defined then this means all jobs will be logged in the
message file.
PROTOCOL
After a JSV script or binary is started it will get commands through its
stdin stream, and it has to respond with certain commands on the stdout
stream. Data sent via the stderr stream of a JSV instance is
ignored. Each command which is sent to/by a JSV script has to be terminated
by a newline character ('\n'), whereas newline characters are not allowed
in the whole command string itself.
PROTOCOL (JSV side)
The following commands have to be implemented by a JSV script so that
it conforms to version 1.0 of the JSV protocol, which was first implemented in
xxQS_NAMExx 6.2u2:
PROTOCOL (client/qmaster side)
A JSV script or binary can send a set of commands to a client/qmaster process
to indicate its state in the communication process, to change the job
specification of a job which should be verified, and to report messages or
errors. Below you can find the commands which are understood by the
client/qmaster which implements version 1.0 of the communication
protocol introduced in xxQS_NAMExx 6.2u2:
PSEUDO PARAMETERS
CAVEATS
See
for advice concerning shell script JSVs.
EXAMPLE
Here is an example for the communication of a client with a JSV instance
when the following job is submitted:
> qsub -pe p 3 -hard -l a=1,b=5 -soft -l q=all.q $SGE_ROOT/examples/jobs/sleeper.sh
START
SEND ENV
STARTED
PARAM VERSION 1.0
PARAM CONTEXT client
PARAM CLIENT qsub
PARAM USER ernst
PARAM GROUP staff
PARAM CMDNAME /sge_root/examples/jobs/sleeper.sh
PARAM CMDARGS 1
PARAM CMDARG0 12
PARAM l_hard a=1,b=5
PARAM l_soft q=all.q
PARAM M user [at] hostname
PARAM N Sleeper
PARAM o /dev/null
PARAM pe_name pe1
PARAM pe_min 3
PARAM pe_max 3
PARAM S /bin/sh
BEGIN
RESULT STATE ACCEPT
COPYRIGHT
See
for a full statement of rights and permissions.