Hi Stephan, From the slurm.conf docs: --- BatchFlag Jobs submitted using the sbatch command have BatchFlag set to 1. Jobs submitted using other commands have BatchFlag set to 0. --- You can look that up e.g. with scontrol show job <jobid>. I haven't checked though how to access that via lua. If you know, let me know, I'd be interested as well.
Example: # scontrol show job 128922 JobId=128922 JobName=sleep ... JobState=RUNNING Reason=None Dependency=(null) Requeue=1 Restarts=0 BatchFlag=0 Reboot=0 ExitCode=0:0 RunTime=00:00:54 TimeLimit=00:30:00 TimeMin=N/A Cheers, Florian -----Original Message----- From: slurm-users <[email protected]> On Behalf Of Stephan Roth Sent: Montag, 18. Mai 2020 16:04 To: [email protected] Subject: [External] [slurm-users] How to detect Job submission by srun / interactive jobs Dear all, Does anybody know of a way to detect whether a job is submitted with srun, preferrably in job_submit.lua? The goal is to allow interactive jobs only on specific partitions. Any recommendation or best practice on how to handle interactive jobs is welcome. Thank you, Stephan
