Sun HPC ClusterTools 6 Software User's Guide
|
  
|
Killing or Sending Signals to Programs With mpkill
|
What You Can Do
To Perform This Task
|
Use This Option
|
How to kill a running program
|
mpkill
|
How to remove all traces of a job
|
-C
|
How to display a list of signals
|
-l -d
|
How to send a signal to a job
|
-signal
|
Return Values
The mpkill command returns these values:
- 0 - The command executed successfully.
- 1 - An error occurred during execution. For example, the job was not known.
- 2 - The command was partially successful. This typically occurs when you send a signal to a job in which one or more of the processes has already exited and therefore could not receive the signal. Note that this is usually not an error, since the reason you are using mpkill is most likely to eliminate a job that has hung in this intermediate state.
To Kill a Running Program
|
To kill a running program, use the mpkill command and the program's job ID:
The mpkill command stops all the processes associated with the Job ID.
The job ID now begins with the name of the resource manager (cre, lsf, pbs, or sge). For example: lsf.1289. To obtain a program's job ID, use the mpps command, described in To Display Information About Individual Jobs (-J).
To Remove All Traces of a Job
|
If you have killed a job but it continues to appear in the output of the mpps command (described in Chapter 7), log in as root to the master node and invoke the mpkill command with the -C option and the jid.
The -C option purges the job from the CRE database, including unpublishing names associated with the job.
Note - Processes spawned in the ClusterTools Runtime Environment are not killed by the mpkill or kill commands so long as they have (spawned) child processes running. To remove the parent process, you must first remove all of its child processes.
|
To Display a List of Supported Signals
(-l -d)
|
To simply list the supported signals, use the -l option.
To display a list with brief descriptions, use the -d option.
To Send a Signal to a Job
|
To send a signal to a job, use this syntax:
For example:
The example above sends a SIGCONT signal to the processes of the program whose job ID is sge.59.
Issuing mpkill without specifying a signal sends a SIGTERM to the job.
TABLE 6-1 Options for mpkill
Command
|
Description
|
none
|
Stop all processes associated with a particular job
|
-C
|
Remove all traces of a job, including unpublished names, from the CRE database
|
-l
|
Display a list of supported signals
|
-d
|
Display a descriptive list of supported signals
|
-signal
|
Send a signal to a job
|
Sun HPC ClusterTools 6 Software User's Guide
|
819-4131-10
|
  
|
Copyright © 2006, Sun Microsystems, Inc. All Rights Reserved.