Slurm: How to find out how much memory is not allocated at a given Node

i am new to SLURM. I am searching for a comfortable way, to see how many memory at an node/nodelist is available for my srun allocation.

I already played around with sinfo and scontrol and sstat but none of them gives me the information i need in one comfortable overview.

I had the idea to write a shell script, in order to fetch all fields of all jobs from scontrol and sum them up. But there must be an easier way. Would be great if anyone has an hint or idea!


Solution 1:

The 7th column of the output of sinfo -N -l will tell you how much memory is installed in each compute node.

$sinfo -N -l
Wed Nov  6 16:31:45 2013
NODELIST                NODES PARTITION       STATE CPUS    S:C:T MEMORY TMP_DISK WEIGHT FEATURES REASON              
node001                    1      Def*        idle    8    2:4:1  24150   920644    100 Xeon,X55 none  

The command scontrol -o show nodes will tell you how much memory is already in use on each node. Look for the AllocMem entry. (Needs Slurm 2.6.0 or more recent)

$ scontrol -o show nodes | awk '{ print $1, $13, $14}'
NodeName=node001 RealMemory=24150 AllocMem=0