PRM(l) PRM(l) NAME prm - Used to delete jobs that are under control of the LCRM SYNOPSIS prm [-h] prm [[-b bank [-u uname]] | -n jidlist] [-T | -A datetime | -gt time | -m host] [-f] [-h] [-v] DESCRIPTION prm is used to delete jobs. A job can only be deleted by its owner or by a coordinator of the bank from which the job is to draw its resources, or by a LCRM manager. If the caller tries to delete a job without proper authority by use of the -b or -u options, it is not deleted and no error message is issued. On the other hand, if the caller tries to delete a job without proper authority by use of the -n option, it is not deleted but an error message is issued. If a selected job is running on a host when it is deleted, the job is killed first. If the -f option is not specified, each selected job is deleted only upon confirmation for that job. The confirmation messages list the LCRM jobid, the job owner name, the account name and the bank name of selected job. A reply of y[es] or n[o] is required. If a message is not input within ten seconds, a "timeout" message is sent to the terminal and prm terminates. Jobs that have been deleted, using the 'prm' utility, will be placed in the history database. Use the -T option to remove the job from the his- tory database. The history database contains completed and deleted/removed jobs. If no jobs are selected or deleted the following message is sent to standard error: "No jobs were deleted." OPTIONS -A datetime The date and time that the job is to be removed. If the job is registered to receive a signal, LCRM will send one when the prm is executed. If the user's code calls the LCRM library routine, lrmgetresource, the stoptime value will reflect the time that the job will be removed. (for exam- ples of format usage, please see the description of the -A option in the PSUB man page.) -T Delete jobs within the history database. The history database contains only completed and/or removed jobs. This can be used to clear out old jobs the user does not want to see any more. -b bank Delete only jobs that are drawing from bank. This option may not be used in conjunction with the -n option. -f Causes jobs to be deleted without asking for confirmation. May not be used by a coordinator. -gt gracetime The amount of wall clock time that the job is to continue to run before it will be removed by LCRM. If the job is registered to receive a signal, LCRM will send one when the prm is executed. If the user's code calls the LCRM library routine, lrmgetresource, the stoptime value will reflect the time that the job will be removed. -h Causes a usage message to be printed to standard error. -m hostname Remove the named host from list of machines that the job is to be considered for execution. (only valid for a non-run- ning job) -n jobidlist Delete only the jobs with LCRM jobids that correspond to one of the items in jobidlist. jobidlist must be a comma separated list of LCRM jobids. This option may not be used in conjunction with either the -b or -u options. -u uname Delete only jobs that are owned by uname. This option may not be used in conjunction with the -n option. -v Verbose mode. Show the jobs that were deleted and write error messages to standard error. EXAMPLES If issued by a user who is neither a coordinator nor a LCRM manager, the following command deletes every job owned by the calling user if the deletion is individually confirmed and lists the jobs deleted. > prm -v If issued by a user who is neither a coordinator nor a LCRM manager, the following command holds all jobs owned by the calling user that are drawing resources from bank A. Confirmation is required. > prm -b A The following command deletes the job 3918 when 10 minutes of wall clock time has passed. > prm -n 3918 -gt 10m The following command deletes the job 3918 if confirmed. No list is made of the deletion. > prm -n 3918 Once job 3918 has been deleted, the status goes to the history database. The following command deletes job 3918, if confirmed, from the history database. No list is made of the deletion. > prm -Tn 3918 If issued by an authorized coordinator, the following command deletes all jobs owned by user1 drawing resources from bank B. Confirmation is required. > prm -u user1 -b B If issued by a LCRM manager the following command deletes all jobs and lists the jobs deleted. Confirmation is not requested. > prm -v -f NOTE If the calling user is not the owner of the job being removed, but is authorized to do a remove, PRM will prompt the user to see if they wish to enter a message that will be included in the mail message that will be sent by LCRM notifying the owner of the removal. The message should be entered with separated lines. Either a '.' in the first position of a line followed by a , or a will terminate the input. If multiple jobs are being removed, then any message entered will be applied to all jobs that are not owned by the calling user. Jobs that are in a transient state, (ie. STAGING, MOVING, BAT_WAIT) can not be removed and an error will be given when attempted. However, retrying after the job is running should be successful. AUTHOR Robert R Wood, Lawrence Livermore National Laboratory, bwood@llnl.gov Philip D Eckert, Lawrence Livermore National Laboratory, eckert@llnl.gov SEE ALSO palter, pexp, phold, prel, pstat PRM(l)