-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcount_down_nodes.sh
executable file
·28 lines (18 loc) · 1.05 KB
/
count_down_nodes.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
date
echo 'sinfo --Node | egrep idle | grep savio | wc -l'
NumIdle=$(sinfo --Node | egrep idle | grep savio | wc -l)
echo 'sinfo --Node | egrep idle\|drain | grep savio | wc -l'
NumIdleDrain=$(sinfo --Node | egrep idle\|drain | grep savio | wc -l)
#echo 'sinfo --Node -R -S %E --format="%9u %19H %6t %N %E"| grep Pwr | wc -l'
#NumPwr=$(sinfo --Node -R -S %E --format="%9u %19H %6t %N %E"| grep Pwr | wc -l)
echo 'sinfo --Node -R -S %E --format="%9u %19H %6t %N %E"| egrep Pwr\|sctrl_reservation | wc -l'
NumPwr=$(sinfo --Node -R -S %E --format="%9u %19H %6t %N %E"| egrep Pwr\|sctrl_reservation | wc -l)
echo 'wwstats -s | egrep Dead\|utilization'
#wwstats -s | egrep Dead\|utilization
NumWwDead=$(wwstats -s | egrep Dead | awk -F: '{print $2}')
NumWwUtil=$(wwstats -s | egrep utilization | awk -F: '{print $2}')
#echo $NumIdle,$NumIdleDrain,$NumPwr,$NumWwDead,$NumWwUtil
echo $NumIdle,$NumIdleDrain,$NumPwr,$NumWwDead,$NumWwUtil | sed 's/,/\t/g'
####
#### by user visible partition, not cluster name...
#### scontrol show partitions | egrep PartitionName\|TotalNode