Tools.pbs.MultiQstat
Usage
Tools.pbs.MultiQstat(
jobs,
config_home="~/.pbs",
cmd="qstat -f",
)Methods
| Name | Description |
|---|---|
| __init__() | This object is used to watch multiple pbs jobs and collect data on these |
| get_qstat_dict() | This job populates a dictionary with qstat objects that correspond to |
| multi_watch() | The multi_watch method takes a dictionary of qstat jobs and |
| watch() | The watch method populates the job dictionary, which is used to watch |
__init__()
This object is used to watch multiple pbs jobs and collect data on these
Usage
__init__(jobs, config_home="~/.pbs", cmd="qstat -f")jobs asynchronously.
Parameters
jobs: list.-
A list of pbs jobs to watch.
config_home: str. = "~/.pbs"-
A configuration directory for storing pbs jobs.
cmd: str. = "qstat -f"- The qstat command used to produce the job status report.
get_qstat_dict()
This job populates a dictionary with qstat objects that correspond to
Usage
get_qstat_dict(jobs, infile=None, outfile=None, cmd=None, wait_time=120)individual pbs jobs.
Parameters
jobs: list.-
A list of target jobs.
infile: str. = None-
The input file and the output file are used in tandem to determine the data file that will be used. If only one of these values are given (infile/outfile), then it will be used as the data file. If neither of these values are given, then a default file (“job_data.csv”) will be used. If both are given, then the infile data is appended to the outfile, which is used as the data file.
outfile: str. = None-
See infile.
cmd: str. = None-
The qstat command used to produce the job status report.
wait_time: int. = 120- The amount of time to wait in between each point of data being collected.
Returns
dict.- The job dictionary is returned.
multi_watch()
The multi_watch method takes a dictionary of qstat jobs and
Usage
multi_watch(job_dict)uses them to asynchronously watch the target jobs in the dictionary.
Parameters
job_dict: dict.- A dictionary whose values are Qstat objects.
Returns
list.- A list of updated qstat jobs that are returned from the asynchronous watch method.
watch()
The watch method populates the job dictionary, which is used to watch
Usage
watch(jobs, infile=None, outfile=None, cmd=None, wait_time=120)the target jobs. The most up to date job info is assigned to the job list class variable.
Parameters
jobs: list.-
A list of target jobs.
infile: str. = None-
The input file and the output file are used in tandem to determine the data file that will be used. If only one of these values are given (infile/outfile), then it will be used as the data file. If neither of these values are given, then a default file (“job_data.csv”) will be used. If both are given, then the infile data is appended to the outfile, which is used as the data file.
outfile: str. = None-
See infile.
cmd: str. = None-
The qstat command used to produce the job status report.
wait_time: int. = 120- The amount of time to wait in between each point of data being collected.