drmaa_jobcontrol(3) | Grid Engine DRMAA | drmaa_jobcontrol(3) |
drmaa_job_ps, drmaa_control, - Monitor and control jobs
#include "drmaa.h"
int drmaa_job_ps(
const char *job_id, int *remote_ps, char *error_diagnosis, size_t error_diag_len
);
int drmaa_control(
const char *jobid, int action, char *error_diagnosis, size_t error_diag_len
);
The drmaa_job_ps() function returns the status of the Grid Engine job job_id into the integer pointed to by remote_ps. Possible return values are listed below. See sge_status(5) for the correspondence between them and the Grid Engine status.
DRMAA_PS_UNDETERMINED | job status cannot be determined |
DRMAA_PS_QUEUED_ACTIVE | job is queued and active |
DRMAA_PS_SYSTEM_ON_HOLD | job is queued and in system hold |
DRMAA_PS_USER_ON_HOLD | job is queued and in user hold |
DRMAA_PS_USER_SYSTEM_ON_HOLD | job is queued and in user and system hold |
DRMAA_PS_RUNNING | job is running |
DRMAA_PS_SYSTEM_SUSPENDED | job is system suspended |
DRMAA_PS_USER_SUSPENDED | job is user suspended |
DRMAA_PS_DONE | job finished normally |
DRMAA_PS_FAILED | job finished, but failed |
Jobs' user hold and user suspend states can be controlled via drmaa_control(3). For affecting system hold and system suspend states the appropriate Grid Engine interfaces must be used.
The drmaa_control() function applies control operations on Grid Engine jobs. jobid may contain either an Grid Engine jobid or `DRMAA_JOB_IDS_SESSION_ALL' to refer to all jobs submitted during the DRMAA session opened using drmaa_init(3). Legal values for action and their meanings are:
DRMAA_CONTROL_SUSPEND | suspend the job |
DRMAA_CONTROL_RESUME | resume the job |
DRMAA_CONTROL_HOLD | put the job on-hold |
DRMAA_CONTROL_RELEASE | release the hold on the job |
DRMAA_CONTROL_TERMINATE | kill the job |
The DRMAA suspend/resume operations are equivalent to the use of -sj jobid and -usj jobid options with Grid Engine qmod(1). The DRMAA hold/release operations are equivalent to the use of Grid Engine qhold(1) and qrls(1). The DRMAA terminate operation is equivalent to the use of Grid Engine qdel(1). Only user hold and user suspend can be controlled via drmaa_control(3). For affecting system hold and system suspend states the appropriate Grid Engine interfaces must be used.
The name of the default cell, i.e. default.
Upon successful completion, drmaa_job_ps(), and drmaa_control() return DRMAA_ERRNO_SUCCESS. Other values indicate an error. Up to error_diag_len characters of error related diagnosis information is then provided in the buffer, error_diagnosis.
The drmaa_job_ps() and drmaa_control() functions may fail with:
The drmaa_control() function may fail with:
$Date: 2009-06-17 09:50:13 $ | SGE 8.1.3pre |