Stop Jobs

A job can be stopped when it is running or queued. Stopping a job does not "forget it" from the vovserver database. A job can only be stopped by the owner or the Accelerator Plus administrator.

wx stop

wx: Usage Message
     Stop jobs.
     1. If the jobs are running, they are killed
        (unless you use option -dequeueonly).
     2. If the jobs are scheduled in the queue,
        they are removed from the queue.
     In either case, the jobs remain in the system.
     To remove them from the system, use the "forget" command.
     Jobs in the system can be rerun with the "rerun" command.
     When stopping a single job, the procedure checks for
     the properties NC_STOP_SIGNALS and NC_STOP_SIG_DELAY
     attached to the job to be stopped.
     The list of signals is also controlled
     by the environment variables VOV_STOP_SIGNALS and NC_STOP_SIGNALS.
     If both NC_STOP_SIGNALS and VOV_STOP_SIGNALS are present in the
     environment, the value of VOV_STOP_SIGNALS will be used.  Their
     functionality is otherwise identical.
     The default list of signals is TERM,HUP,INT,KILL and
     can be customized with the variable defaultStopSignalCascade in policy.tcl.
      % wx stop [OPTIONS] <jobId> ...
      -h                  -- This message
      -set <setname>      -- Stop all my jobs in the given set.
      -J <jobname>        -- Stop all my jobs with given jobname.
      -mine               -- Stop all my jobs.
      -dir <directory>    -- Stop all jobs in the given directory.
      -allusers           -- Stop all jobs (only ADMIN can do it).
      -dequeueonly        -- Just remove jobs from the queue.
                             All currently running jobs are not affected.
                             Can be abbreviated to -d.
      -d                  -- Same as -dequeueonly.
      -signals <SIGLIST>  -- Comma separated list of signals to send to the jobs
                             (default is the sequence TERM,HUP,INT,KILL )
                             This can be also set with property NC_STOP_SIGNALS
                             or with the environment variables NC_STOP_SIGNALS
                             or VOV_STOP_SIGNALS.
                             Priority: 1. Option -signals
                                       2. job property NC_STOP_SIGNALS
                                       3. env variable VOV_STOP_SIGNALS,
                                       4. default (can be configured as
                                          in policy.tcl)
                             See also:  vovshow -env VOV_STOP_SIGNALS
                                        vovshow -env NC_STOP_SIGNALS
      -sig     <SIGLIST>  -- Same as -signals.
      -exclude <PROCLIST> -- List of processes to exclude from receiving the
      -include <PROCLIST> -- List of processes to receive the signal.
      -after   <s>        -- Start sending signals after specified seconds.
                             This is an initial delay, between 0 and 20s.
      -delay   <s>        -- Minimum delay between signals (in seconds),
                             between 0 and 20s. Default is 3.
                             This can also be set with the property
                             NC_STOP_SIG_DELAY, or with the environment
                             variables NC_STOP_SIG_DELAY or
                             VOV_STOP_SIGNAL_DELAY.  If both NC_STOP_SIG_DELAY
                             and VOV_STOP_SIGNAL_DELAY are present in the
                             environment, the value of NC_STOP_SIGNAL_DELAY
                             will be used.
                             Priority: 1. Option -delay
                                       2. job property NC_STOP_SIG_DELAY
                                       3. env variable VOV_STOP_SIGNAL_DELAY,
                                       4. default
      -why <reason>       -- Give a reason for the stop.
                             This is stored on the WHYSTATUS
                             field of the stopped jobs.
      % wx stop 00123456
      % wx stop -d -mine
      % wx stop -after 3 -mine
      % wx stop -set Class:hsim
      % wx stop -mine -why "Jobs no longer needed"
      % wx stop -sig "TERM,KILL" -delay 4 0012345
      % env VOV_STOP_SIGNALS=TERM,INT,KILL wx stop 0012345
      % vovshow -env VOV_STOP_SIGNALS
      % vovshow -env NC_STOP_SIGNALS
      % vovshow -env VOV_STOP_SIGNAL_DELAY
      % vovshow -env NC_STOP_SIG_DELAY

Override Signals to Stop a Job

A job can be stopped by overriding the sequence of signals that are sent for the job. To do so, set the properties NC_STOP_SIGNALS and NC_STOP_SIG_DELAY.

Automatic Stopping Based on Elapsed Time

If a job is submitted with the -autokill option, it will be stopped after the specified amount of time has elapsed. The check to stop the job is performed by the tasker itself at an interval of about one minute, which can be controlled with the -U option of vovtasker).

For example:
% wx run -autokill 30m sleep 1000000 

Automatic Stopping Based on CPU Time

To stop a job that exceeds a specific duration of CPU time, set the variable VOV_LIMIT_cputime. A job that exceeds the limit will be killed by UNIX and will have status "Failed".

For example:
% wx run -e "BASE+D(VOV_LIMIT_cputime=10)" vovmemtime 10 100 0