jobinfo

jobinfo

Get HPC usage metadata for a list of slurm jobids on biowulf

About

This wrapper script works only on BIOWULF! This script usage the “dashboard_cli” utility on biowulf to get HPC usage metadata for a list of slurm jobids. These slurm jobids can be either provided at command line or extracted from a snakemake.log file. Using snakemake.log file option together with –failonly option lists path to the STDERR files for failed jobs. This can be very useful to debug failed Snakemake workflows.

USAGE

$ jobinfo -h

Example

$ jobinfo -j 123456,7891011 $ jobinfo -s path/to/snakemake.log $ jobinfo -j 123456,7891011 -o path/to/report.tsv $ jobinfo -s path/to/snakemake.log –failonly

Functions

Name Description
check_help check if usage needs to be printed
check_host Validate that the current host is supported.
check_int_set_zero Convert an empty string to zero or cast it to an integer.
collect_args Parse the CLI arguments.
exit_w_msg Gracefully exit with proper message
filter_rows Filter rows.
get_jobinfo Retrieve job information from dashboard_cli.
main Run the CLI.
mem2gb Convert a memory string to gigabytes.
print2screen Print the job table to the screen.
time2sec Convert a SLURM time string to seconds.

check_help

jobinfo.check_help(parser)

check if usage needs to be printed

check_host

jobinfo.check_host()

Validate that the current host is supported.

check_int_set_zero

jobinfo.check_int_set_zero(s)

Convert an empty string to zero or cast it to an integer.

collect_args

jobinfo.collect_args()

Parse the CLI arguments.

exit_w_msg

jobinfo.exit_w_msg(message)

Gracefully exit with proper message

filter_rows

jobinfo.filter_rows(func)

Filter rows.

get_jobinfo

jobinfo.get_jobinfo(args)

Retrieve job information from dashboard_cli.

main

jobinfo.main()

Run the CLI.

mem2gb

jobinfo.mem2gb(memstr)

Convert a memory string to gigabytes.

print2screen

jobinfo.print2screen(t, args)

Print the job table to the screen.

time2sec

jobinfo.time2sec(timestr)

Convert a SLURM time string to seconds.