bkill.1



NAME

     bstop, bresume, bdel, bkill -  suspend,  resume,  delete  or
     send a signal to bstop, bresume, bkill - suspend, resume, or
     send a signal to one or more unfinished batch jobs


SYNOPSIS

     bstop [ -h ] [ -V ] [-R] [-d] [-a] [ -q queue_name  ]  [  -m
     host_name ]
           [ -u user_name | -u all ] [ -J job_name ]  [  jobId  |
           "jobId[index_list]"  ...  ] [ jobId  ... ]

     bresume [ -h ] [ -V ] [-R] [ -q queue_name ] [ -m  host_name
     ]
             [ -u user_name | -u all ] [ -J job_name ] [ jobId  |
             "jobId[index_list]"  ...  ] [ jobId  ... ]

     bkill [ -h ] [ -V ]  [  -l  ]  [-R]  [  -s  (signal_value  |
     signal_name ) ]
           [ -q queue_name ] [ -m host_name ] [ -u user_name | -u
           all  ]  [  -J job_name ] [ jobId | "jobId[index_list]"
           ...  ] [ jobId  ... ]

     bdel [ -h ] [ -V ] [-R] [-d] [-a] [ -q queue_name ]
          [ -m host_name ] [  -u  user_name  |  -u  all  ]  [  -J
          job_name  ]  [  -n  num_runs]  jobId   ...  ] [ [ jobId
          |"jobId[index_list]"  ...  ] jobId  ... ]


DESCRIPTION

     Suspend, resume, delete, or send a signal  to  one  or  more
     unfinished  batch  jobs.   The suspending and resuming batch
     job operations performed by bstop or  bresume  can  also  be
     performed  by bkill using the proper signal specified by the
     option -s.

     The SIGCONT signal is sent by bresume.  The  SIGSTOP  signal
     is  sent  to sequential jobs and SIGTSTP is sent to parallel
     jobs by bstop. The default operation of bkill is to  send  a
     set  of signals to kill the specified jobs.  On UNIX, SIGINT
     and SIGTERM are sent to give the job a chance to  clean   up
     before  termination,  then  SIGKILL is sent to kill the job.
     On Windows NT, job control messages replace the  SIGINT  and
     SIGTERM  signals (but only customized  applications can pro-
     cess them) and the TerminateProcess() system call is sent to
     kill  the job. The time interval between sending each signal
     is  defined  by  the  JOB_TERMINATE_INTERVAL  parameter   in
     lsb.params(5).

     bdel can be used to remove a repetitive job from the system.
     Using  bkill  on  a repetitive job kills the current run, if
     the job has been started, and requeues the job. See bcadd(1)
     and  bsub(1)  for  how  to set up a job to run repetitively.
     The -n option of bdel can be used to delete  the  job  after
     the specified number of runs.

     A user can only operate on his or her own  jobs.  Only  root
     and  LSF  administrators  can  operate  on jobs submitted by
     other users.


OPTIONS

     -h   Print command usage to stderr and exit.

     -V   Print LSF release version to stderr and exit.

     -R   Do the operation recursively on the job group tree.

     -d   Do the operation on the finished jobs only.

     -a   Do the operation on the  all  jobs  including  finished
          jobs.


     -l   Available to bkill only. Display a set of signal  names
          supported  by  bkill.   Note  that  this is a subset of
          those supported by /bin/kill and is platform dependent.

     -s signal_value or signal_name
          This option is available to bkill only.   It  specifies
          the  signal to send to the given jobs.  You can specify
          either a name, stripped of  the  SIG  prefix  (such  as
          KILL),  or  a  number (such as 9).  The eligible signal
          names are listed by bkill -l.  The default is  to  send
          the SIGKILL signal to the jobs.

     -n num_runs
          This option is available to bdel only. The job will  be
          deleted  after  the  specified number of runs have com-
          pleted. Each time the job finishes, it is considered to
          have run once.

     -q queue_name
          Operate only on those jobs in the  queue  specified  by
          queue_name  (see  bqueues(1)).   If jobId is not speci-
          fied, only the most recently submitted  qualifying  job
          is operated upon.  The -q option is ignored if a job ID
          other than 0 is specified in the jobId option.

     -m host_name
          Operate only on those jobs dispatched to  the  host  or
          host   group   that  is  specified  by  host_name  (see
          bhosts(1) and bmgroup(1)).  If jobId is not  specified,
          only  the  most  recently  submitted  qualifying job is
          operated upon.  The -m option is ignored if  a  job  ID
          other than 0 is specified in jobId option.

     -u user_name | all
          Operate on the jobs submitted by the user or user group
          (see  bugroup(1)) that is specified by user_name, or by
          all users if the reserved user name all is  given.   If
          jobId  is not specified, only the most recently submit-
          ted qualifying job is operated upon.  The -u option  is
          ignored  if  a  job ID other than 0 is specified in the
          jobId option.

     -J job_name
          Operate on the jobs that have the  specified  job_name.
          The  -J  option  is ignored if a job ID other than 0 is
          specified in the jobId option.

     jobId ...
          jobId | jobId[index_list] ...  Operate  only  on  those
          jobs     that     are    specified    by    jobId    or
          "jobId[index_list]", where  "jobId[index_list]"  speci-
          fies  selected  job  array elements (see bjobs(1)) Jobs
          submitted by any user can  be  specified  here  without
          using the -u option.  If you use the reserved job ID 0,
          the operation is applied to all the jobs  that  satisfy
          other options (that is, -m, -q, -u and -J, see previous
          sections), and all other  job  IDs  are  ignored.   The
          options  -u,  -q,  -m and -J have no effect if a job ID
          other than 0 is specified. Job IDs are returned at  job
          submission time (see bsub(1) ) and may be obtained with
          the bjobs command (see bjobs(1)).


NOTES

     You cannot suspend a  job  that  is  already  suspended,  or
     resume  a  job  that  is  not suspended. In terms of the job
     states described in bjobs(1) , using bstop on a job that  is
     in  the USUSP state has no effect and using bresume on a job
     that is not in either the PSUSP or the USUSP  state  has  no
     effect.

     If a signal request fails to reach the job  execution  host,
     LSF  will  retry  the  operation later when the host becomes
     reachable.  LSF retries the most recent signal request.

     For a description of the possible states for batch jobs, see
     bjobs(1) and the LSF User's Guide.


EXAMPLES

     % bstop 314
          Suspend job number 314.

     % bresume -q night 0
          Resume all of the invoker's suspended jobs that are  in
          queue night.

     % bkill -s 17 -q night
          Send signal 17 to the last job that  was  submitted  by
          the invoker to queue night.

     % bstop -m apple
          Suspend the invoker's last job that was  dispatched  to
          host apple.

     % bstop -u smith 0
          Suspend all the jobs submitted by user smith.

     % bkill -q short -u all 0
          Kill all the jobs that are in the queue short.

     % bstop -u all
          Suspend the last submitted job in the LSF system.

     % bstop -u all 0
          Suspend all the batch jobs in the LSF system.

     % bresume -m orange 0
          Resume all the invoker's jobs that were  dispatched  to
          host orange and are suspended.


SEE ALSO

     bsub(1),  bjobs(1),   bqueues(1),   bhosts(1),   bparams(5),
     mbatchd(8), kill(1), signal(2)