user3282611
user3282611

Reputation: 920

how to find the command used for a slurm job based on job id?

After submitting a slurm job using sbatch file.slurm, you get a job ID. You can use squeue and sacct to check the job's status. But neither returns the original submission command (sbatch file.slurm) for the job. Is there a command to show the submission command, namely sbatch file.slurm? I need to link job IDs with my submission commands.

So far, the only way is by saving the return of sbatch command somewhere.

Upvotes: 1

Views: 2772

Answers (1)

j23
j23

Reputation: 3530

No, there is no command to show the submission command. One workaround is to put the jobname as the filename.

#SBATCH -J "file_name"

So, when you do squeue or scontrol show job, then you can match your job id with the filename.

There is no other way to achieve the desired objective.

Upvotes: 0

Related Questions