Hi,
We also encountered a problem where users just open shells for the longest time possible and leave it there without actually using the resources. Against this I wrote a job_submit plugin that differentiates between srun/salloc and sbatch. I didn't check to see if the --pty can be distinguished, because I generally wanted to get rid of excess srun instances running on the submission node. I check the "script" attribute of the job to see if it's interactive or not, and use "interactive" licenses and a special partition to limit the number of interactive jobs per user. srun inside sbatch aren't affected by this limitation. You can see the code in: https://github.com/irush-cs/slurm-plugins We're still on 15.08 so I haven't tested it on 16.05, but I think it should work. HTH, Yair. On Mon, Feb 06 2017, "Prasad, Bhanu" <[email protected]> wrote: > Hi, > > we recently migrated to slurm-16.05.4 > > Is there a way to detect whether the user is executing srun with/without --pty > in job_submit plugin or any other plugin > we need to limit a partition to only srun without --pty (i.e non-interactive > only) > > but can be able to run regular srun > Is there any variables that detect this feature or any one know a work around > that does this kind of stuff > > And > > Is there a way to capture commands executed by user using srun / sbatch with - > -wrap > And how to redirect these commands to slurmdb > If changing default slurmdb is a bad idea > how to set up a new parallel database that store all job information including > things like commands etc.. > > And > > Are there any default ports defiend for the use of mpirun with srun ?? > > -- > Thanks&Regards > Bhanu
