-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathqueue_size
More file actions
executable file
·37 lines (30 loc) · 775 Bytes
/
queue_size
File metadata and controls
executable file
·37 lines (30 loc) · 775 Bytes
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
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#Move to column $1
function mcol(){
VAL=${1:-10}
tput cub `tput cols`
tput cuf ${VAL}
}
# Total number of nodes in use
num_nodes=`qstat -a | grep hpcff | grep ' R ' | awk '{total = total + $6}; END {print total+0}'`
# Total number of queued jobs
jobs_queued=`qstat -a | grep hpcff | grep ' Q ' | awk 'END {print NR}'`
# Total number of queued nodes
nodes_queued=`qstat -a | grep hpcff | grep ' Q ' | awk '{total = total + $6}; END {print total+0}'`
echo -en "Number of nodes"
mcol 18
echo -en "|"
echo -en "Queued jobs"
mcol 34
echo -en "|"
echo -en "Queued nodes"
echo
echo "-----------------------------------------------"
echo -en $num_nodes
mcol 18
echo -en "|"
echo -en $jobs_queued
mcol 34
echo -en "|"
echo -en $nodes_queued
echo