Hello,
I have created this simple script to feed rrdtool with graphs about
nodes and their state:
#!/bin/bash
# Fetch this:
# sinfo -p slurm1 -o "%9P %.5D %6t"
#
# PARTITION NODES STATE
# slurm1* 4 drain*
# slurm1* 2 down*
# slurm1* 2 drain
# slurm1* 115 alloc
# slurm1* 5 idle
sinfo -h -p slurm1 -o "%9P %.5D %6t"|awk '{print $2}'|tr -s '\n' ' ' >
/tmp/rrdtool_read.txt
One of our problems is that sinfo splits "drain" and "drain*" into 2
lines, and when we don´t have a "drain*" state, that line will
disapperar, and my columns gets in the wrong order. I´m not sure, but
sometimes sinfo even puts "down" in 2 separate lines
Is there a way to tell sinfo to put the STATE in the same line count and
order? (For example, write a line: "slurm1* 0 down*")
Thanks,
/Per Lonnborg