extract_submission_commands: Find a string in a user's recent Slurm squeue

View source: R/build_metadata_shell.R

extract_submission_commandsR Documentation

Find a string in a user's recent Slurm squeue

Description

Intended to find Rstudio singularity image versions for metadata. Finds a user-defined string from the submission command you used to start your Rstudio singularity image (or something else you desire). Extracts this informtion from ALL jobs you currently have active in your squeue.

Usage

extract_submission_commands(
  jobname_filter,
  submitline_n_char,
  regex_to_extract,
  regex_to_ignore,
  system_user_name,
  cluster_type
)

Arguments

jobname_filter

[character|regex] When you run 'squeue -u <username>', what 'NAME' do you want to filter for?

submitline_n_char

[int] Length of submitted command string to expect from system (set this much longer than you'd think necessary)

regex_to_extract

[character|regex] What string do you want to extract after running 'squeue -j <jobid> -o submitline%xxx'

regex_to_ignore

[character|regex] If your 'regex_to_extract' command finds more strings than you want, this removes strings with the specified pattern

system_user_name

[chr] User's identifier, according to the cluster

cluster_type

e.g. "slurm"

Value

[list] All desired submission commands, and specific extracted text from regex_to_extract


epi-sam/SamsElves documentation built on June 12, 2025, 7 a.m.