This subroutine allows an application program to perform most of the functions that are currently available through the standalone commands: llctl, llfavorjob, llfavoruser, llhold, and llprio.
LoadLeveler API library libllapi.a
#include "llapi.h" int ll_control(int control_version, enum LL_control_op control_op, char **host_list,char **user_list, char **job_list, char **class_list, int priority);
enum LL_control_op { LL_CONTROL_RECYCLE, LL_CONTROL_RECONFIG, LL_CONTROL_START, LL_CONTROL_STOP, LL_CONTROL_DRAIN, LL_CONTROL_DRAIN_STARTD, LL_CONTROL_DRAIN_SCHEDD, LL_CONTROL_PURGE_SCHEDD, LL_CONTROL_FLUSH, LL_CONTROL_SUSPEND, LL_CONTROL_RESUME, LL_CONTROL_RESUME_STARTD, LL_CONTROL_RESUME_SCHEDD, LL_CONTROL_FAVOR_JOB, LL_CONTROL_UNFAVOR_JOB, LL_CONTROL_FAVOR_USER, LL_CONTROL_UNFAVOR_USER, LL_CONTROL_HOLD_USER, LL_CONTROL_HOLD_SYSTEM, LL_CONTROL_HOLD_RELEASE, LL_CONTROL_PRIO_ABS, LL_CONTROL_PRIO_ADJ };
The ll_control subroutine performs operations that are essentially equivalent to those performed by the standalone commands: llctl, llfavorjob, llfavoruser, llhold, and llprio. Because of this similarity, descriptions of the ll_control operations are grouped according to the standalone command they resemble.
These are the ll_control operations which mirror operations performed by the llctl command. This summary includes a brief description of each of the allowed llctl types of operations. For more information on the llctl command, see llctl - Control LoadLeveler Daemons.
For these llctl type of operations, the user_list, job_list, and priority arguments are not used and should be set to NULL or zero. The class_list argument is meaningful only if the operation is LL_CONTROL_DRAIN_STARTD, or LL_CONTROL_RESUME_STARTD. If class_list is not being used, then it should be set to NULL. If host_list is NULL, then the scope of the operation is all machines in the LoadLeveler cluster. Unlike the standalone llctl command, where the scope of the operation is either global or one host, ll_control operations allow the user to specify a list of hosts (through the host_list argument). To perform these operations, the calling program must have LoadLeveler administrator authority.
The llfavorjob type of control operations are: LL_CONTROL_FAVOR_JOB, and LL_CONTROL_UNFAVOR_JOB. For these operations, the user_list, host_list, class_list, and priority arguments are not used and should be set to NULL or zero. LL_CONTROL_FAVOR_JOB is used to set specified job steps to a higher system priority thatn all job steps that are not favored. LL_CONTROL_UNFAVOR_JOB is used to unfavor previously favored job steps, restoring the original priorities. The calling program must have LoadLeveler administrator authority to perform these operations.
The llfavoruser type of control operations are: LL_CONTROL_FAVOR_USER, and LL_CONTROL_UNFAVOR_USER. For these operations, the host_list, job_list, class_list, and priority arguments are not used and should be set to NULL or zero. LL_CONTROL_FAVOR_USER sets jobs of one or more users to the highest priority in the system, regardless of the current setting. Jobs already running are not affected. LL_CONTROL_UNFAVOR_USER is used to unfavor previously favored user's jobs, restoring the original priorities. The calling program must have LoadLeveler administrator authority to perform these operations.
The llhold type of control operations are: LL_CONTROL_HOLD_USER, LL_CONTROL_HOLD_SYSTEM, and LL_CONTROL_HOLD_RELEASE. For these operations, the class_list and priority arguments are not used, and should be set to NULL or zero. LL_CONTROL_HOLD_USER and LL_CONTROL_HOLD_SYSTEM place jobs in user hold and system hold, respectively. LL_CONTROL_HOLD_RELEASE is used to release jobs from both types of hold. The calling program must have LoadLevler administrator authority to put jobs into system hold, and to release jobs from system hold. If a job is in both user and system holds then the LL_CONTROL_HOLD_RELEASE operation must be performed twice to release the job from both types of hold. If the user is not a LoadLeveler administrator then the llhold types of operations have no effect on jobs that do not belong to him/her.
The llprio type of control operations are: LL_CONTROL_PRIO_ABS, and LL_CONTROL_PRIO_ADJ. For these operations, the user_list, host_list, and class_list arguments are not used, and should be set to NULL. llprio type of operations change the user priority of one or more job steps in the LoadLeveler queue. LL_CONTROL_PRIO_ABS specifies a new absolute value of the user priority, and LL_CONTROL_PRIO_ADJ specifies an adjustment to the current user priority. The valid range of LoadLeveler user priorities is 0-100 (inclusive); 0 is the lowest possible priority, and 100 is the highest. The llprio type of operations have no effect on a running job step unless this job step returns to Idle state. If the user is not a LoadLeveler administrator, then an llprio type of operation has no effect on jobs that do not belong to him/her.
Commands: llprio, llhold, llfavoruser,llfavorjob,llctl.