Skip to content

Commit e500d9b

Browse files
OleHolmNielsenthiell
authored andcommitted
slurm.conf.example: Added configuration section for slurmuser,su (#387)
* Added configuration section for section slurmuser,su * Changed -t running into -t R
1 parent 805dd0c commit e500d9b

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

conf/groups.conf.d/slurm.conf.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@ map: squeue -h -j $GROUP -o "%N"
3030
list: squeue -h -o "%i" -t R
3131
reverse: squeue -h -w $NODE -o "%i"
3232
cache_time: 60
33+
34+
#
35+
# SLURM user bindings for running jobs
36+
#
37+
[slurmuser,su]
38+
map: squeue -h -u $GROUP -o "%N" -t R
39+
list: squeue -h -o "%i" -t R
40+
reverse: squeue -h -w $NODE -o "%i"
41+
cache_time: 60

doc/sphinx/config.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,22 @@ allocated for this job::
439439
reverse: squeue -h -w $NODE -o "%i"
440440
cache_time: 60
441441

442+
The fourth section **slurmuser,su** defines a group source based on Slurm users.
443+
Each group is based on a username and contains the nodes currently
444+
allocated for jobs belonging to the username::
445+
446+
[slurmuser,su]
447+
map: squeue -h -u $GROUP -o "%N" -t R
448+
list: squeue -h -o "%i" -t R
449+
reverse: squeue -h -w $NODE -o "%i"
450+
cache_time: 60
451+
452+
Example of use with :ref:`clush <clush-tool>` to execute a command on all nodes
453+
with running jobs of username::
454+
455+
$ clush -bw@su:username 'df -Ph /scratch'
456+
$ clush -bw@su:username 'du -s /scratch/username'
457+
442458
:ref:`cache_time <group-external-caching>` is also set to 60 seconds instead
443459
of the default (3600s) to avoid caching results in memory for too long, because
444460
this group source is likely very dynamic (this is only useful for long-running

0 commit comments

Comments
 (0)