clusterlib.scheduler.queued_or_running_jobs

clusterlib.scheduler.queued_or_running_jobs(user=None, encoding='utf-8')

Return the names of the queued or running jobs under SGE and SLURM.

The list of jobs could be either the list of all jobs on the scheduler or only the jobs associated to the user calling this function. The default behavior is dependant upon scheduler configuration. Try qstat in SGE or squeue in SLURM to know which behavior it follows.

Parameters:

user : str or None, (default=None)

Filter the job list using a given user name.

encoding : str, (default=’utf-8’)

Encoding to decode the job names. UTF-8 is the default encoding of Linux systems so job names that contain non-ASCII characters should be decoded properly with the default value. In case their are not it is possible to change this parameter to select the right encoding.

Returns:

out : list of string,

Returned a list containing all the names of the jobs that are running or queued under the SGE or SLURM scheduler.