Hi Mark,

I know that you want a script to have both information in the same place,
but I'll give the bash scripts I have already.

*To list all the cluster nodes, this is a quick script, use: <executable>*
sinfo -o "%10N %.3a %.10l %.4D %.14C %.8O %.7m %f %E %T" | head -1
for i in `sinfo -o "%N" | grep -v NODE | sed 's/,/ /g'`
do
  sinfo -n $i -o "%10N %.3a %.10l %.4D %.14C %.8O %.7m %f %E %T" | grep -v
NODE
done

*To check on all the jobs running on a certain node, use: <executable>
<nodename>*
export list=`squeue -o "%.18i %.9P %.8j %.8u %.2t %.10M %.5m %.6D %.3C %R"
| grep $1`
if [ -n "$list" ]; then
  scontrol show node $1
  echo "   JOBID PARTITION     NAME     USER ST       TIME   MEM  NODES CPU
NODELIST(REASON)"
  squeue -o "%.8i %.9P %.8j %.8u %.2t %.10M %.5m %.6D %.3C %R" | grep $1
  echo
else
  echo "No job is running on this node"
fi

Hadrian

On Thu, Apr 27, 2017 at 4:18 PM, Mark London <[email protected]> wrote:

>
> 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
>



-- 
Hadrian Djohari
HPCC Manager, [U]Tech
Case Western Reserve University
(W): 216-368-0395
(M): 216-798-7490

Reply via email to