jobkill - NetWorker jobs termination program



[ -s server ] [ -c <client> ] [ -t <job type> ] [ -f <output_file> ] [ -T <timeout> ]


[ -s server ] [ -f <output_file> ] [ -T <timeout> ] -j <jobid>


[ -s server ] [ -c <client> ] [ -t <job type> ] [ -f <output_file> ] [ -T <timeout> ] -i <input_file>


jobkill utility allows an administrator to kill individual jobs by specifying their jobid, or it will query jobs database for running jobs of a given type and/or on a given client and let an administrator kill them from the interactive prompt. Without arguments jobkill will query for all running jobs. If there are no running jobs fulfilling the criteria, jobkill exits silently.

In all modes, jobkill takes "-s <server>" option to specify the server on which nsrjobd is running, and "-f <file>" to specify the file to which the output should be directed. In the "-i <input file>" mode, '-' is supported for input to be read from stdin. "-w" with no arguments can be used to instruct jobkill to poll nsrjobd for status until all requests have been obeyed by remote jobs.

One must be root to execute jobkill. Operate NetWorker priviledge is required for terminating jobs.

jobkill in default behaviour reports success once the termination request is acknowledged by nsrjobd. Normally jobkill does not wait for the termination request to complete, due to the asynchronous nature of the termination handling, and lack of a parent-child relationship between jobkill and the job being killed. -w provides an option to poll jobs' status to detect the success or failure of actual termination operations, but one needs to remember that it may take several minutes before the job obeys the request. This option is intended to be used in non-interactive mode, especially with the list of jobids provided in an input file. In interactive mode, a user can easily verify that the job had successfully exited using the 'r' (refresh) command at the jobkill's prompt.

jobkill can terminate anything that listens on a channel it has with nsrjobd. That means either an entire savegrp or any worker job spawned by nsrjobd. It cannot kill manually started jobs (with exception of creator jobs such as savegrp ). A job terminated via jobkill will have the attribute "Reason job was terminated:" filled in with "Kill request from jobkill utility"


-s server

The name of the NetWorker server to contact. Appropriate permissions level (Operate NetWorker) will be enforced.

-c client

In interactive mode, limit the query to running jobs on specified client only. Can be combined with -t to further narrow down the result list.

-j job id

Single job id of the job to terminate.

-t job type

In interactive mode, limit the query to running jobs of the specified type only. Can be combined with -c to further narrow down the result list.

-T timeout

Timeout in seconds to wait before issuing a forceful shutdown signal (an equivalent of kill -9).

-i input file

Input file containing the list of job ids to terminate. '-' indicates stdin.

-f output file

File to direct the output to.


Wait for the jobs to terminate before exiting. Due to the asynchronus nature of interaction with nsrjobd, normally jobkill considers it a success when nsrjobd indicates that the signal was sent on the channel without errors. It may take much longer for the job to actually exit. In interactive mode, r (refresh) can be used to check whether the job remains active. Using -w will cause jobkill to poll nsrjobd for status of the jobs until all termination requests have been obeyed. This option is intended for non-interactive mode of operation.

Example usage:

1) to kill an individual job

jobkill -j jobid

2) to query nsrjobd and specify the jobid at the prompt

jobkill [ -c <client> ] [ -t <type> ]

3) to kill multiple jobs at once using an input file

jobkill -i <input_file>