Skip to content

Commit

Permalink
No bug: ad-hoc report for investigating OOD jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars T Hansen committed Dec 4, 2024
1 parent 0b77ca3 commit c8dc88a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions adhoc-reports/ood-investigation.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
raw_output=rawdata-4w
cleaned_output=cleaned-4w
computed_output=computed-4w
sheets_name=computed-4w.csv

# Get all OOD jobs
fields=JobName/m30,Duration/sec,CpuAvgPct,CpuPeakPct,RequestedCpus,Cmd
sonalyze jobs -cluster fox -from 4w -fmt awk,noheader,$fields -u - -min-runtime 2h \
| grep OOD > $raw_output

# Remove some junk jobs
grep -v -E '^OOD ' < $raw_output > $cleaned_output

# Compute utilization columns, add headers, sort data by name
echo $(echo $fields | sed 's/,/ /g') 'ave/alloc% peak/alloc%' > $computed_output
cat $cleaned_output | tail -n +2 \
| awk '{ print $0, $3/$5, $4/$5 }' \
| sort \
>> $computed_output

# Google sheets requires an approved extension to import a file
cp $computed_output $sheets_name

0 comments on commit c8dc88a

Please sign in to comment.