apps.crc_job_stats
Command line utility to print basic information about a running job.
This application is designed to called at the bottom of a job submission
script. Using the sacct
utility, it fetches information about the submitted
job and prints a summary to the terminal.
Important
This application will error out if not called from within a slurm job.
Module Contents
- class CrcJobStats
Bases:
apps.utils.cli.BaseParser
Track job information from within a Slurm job.
Include this command at the end of your Slurm job scripts.
- cluster
- job_id
- exit_if_not_in_slurm() None
Exit the application if not running from within a slurm job
- get_job_info() Dict[str, str]
Return information about the running job as a dictionary
- Returns:
A dictionary of job information fetched from
scontrol
- pretty_print_job_info(job_info: dict) None
Print information about a running job in a readable format
- Parameters:
job_info – A dictionary of information about the running job
- app_logic(args: argparse.Namespace) None
Logic to evaluate when executing the application
- Parameters:
args – Parsed command line arguments