I've been missing such a node status tool for Slurm for a long time!
For Torque clusters I wrote the tool "pestat" (available in ftp://ftp.fysik.dtu.dk/pub/Torque/) and we use it all the time.

Here's my quick stab at writing a "pestat" tool for Slurm: ftp://ftp.fysik.dtu.dk/pub/Slurm/pestat

I'll announce "pestat" separately on this list. It requires you to install a host-expression expansion tool from https://www.nsc.liu.se/~kent/python-hostlist/

/Ole

On 04/27/2017 11:11 PM, Vicker, Darby (JSC-EG311) wrote:
I don't think there is a one liner slurm command to do this.  Even the 
"pbsnodes" wrapper that comes with slurm punts on this:

       # find job(s) on node
       my $jobs; >

       if ( $state eq "allocated" ) {
            # how to get list of jobs on node efficiently?
       }

       # this isn't really defined in SLURM, so I am not sure how to get it


We have a perl script that runs "scontrol show jobs" to get the list of nodes each job is 
running on and then combines that with a "scontrol show nodes" output to get what you 
describe.

# nodeinfo.pl

            CPU's
     Node use/tot         state    reserv job info
 -------- ------- ------------- --------- ----------------------------------
   r1i0n0   12/12 job-exclusive     ----- 45360,gsalaza3
   r1i0n1   12/12 job-exclusive     ----- 45360,gsalaza3
   r1i0n2   12/12 job-exclusive     ----- 45360,gsalaza3
   r1i0n3   12/12 job-exclusive     ----- 45360,gsalaza3
   r1i0n4    0/12          idle     -----
   r1i0n5    0/12          idle     -----
.
.
.







-----Original Message-----
From: Mark London <[email protected]>
Reply-To: slurm-dev <[email protected]>
Date: Thursday, April 27, 2017 at 3:18 PM
To: slurm-dev <[email protected]>
Subject: [slurm-dev] New slurm user question.


Hi - I want a method to create a list all the cluster nodes, with one
node line per line, and include the job(s) running, for each node.  I
haven't quite found a command that will do this.   Before I write a
script to do this, I was wondering if someone else has already done
this.   Or whether there is a command to do it, that I'm not aware of.
Thanks very much.

Mark London

Reply via email to