Skip to content
Snippets Groups Projects
Commit 0de4a9dd authored by cp1g18's avatar cp1g18
Browse files

Delete cur

parent 6504aea3
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
squeue -lu username | sed -n '3,$p' > /tmp/temp_cur
job_nums=cat /tmp/temp_cur|awk '{print $1}'
printf "%-12s %-8s %-8s %-12s %-9s %-120s\n" "job" "type" "nodes" "Time" "state" "route"
for i in $job_nums; do
scontrol show job $i > /tmp/temp_current
route=cat /tmp/temp_current | grep -n 'WorkDir='|awk -F '=' '{print $2}'
QstatA=cat /tmp/temp_cur|grep $i
stat=echo $QstatA | awk '{print $5}'
nodelist=echo $QstatA | awk '{print $9}'
nodes=echo $QstatA | awk '{print $8}'
imes=echo $QstatA | awk '{print $6}'
Times=echo $QstatA | awk '{print $7}'
printf "%-8s %-13s %-3s %-15s %-10s %-120s\n" "$i" "$nodelist" "$nodes" "$imes"/"$Times" "$stat" "$route"
done
rm /tmp/temp_current
rm /tmp/temp_cur
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment