-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No bug: ad-hoc report for investigating OOD jobs
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |