parent
db2ca075ed
commit
32b82db7a3
1 changed files with 23 additions and 0 deletions
@ -0,0 +1,23 @@ |
|||||||
|
#!/bin/bash |
||||||
|
# |
||||||
|
# Frequently-used `sacct` commands with various presets. |
||||||
|
# |
||||||
|
# Created: 20190719 |
||||||
|
# |
||||||
|
# |
||||||
|
# Preset 1: frequently sought information, such as job ID, username, |
||||||
|
# num of cores, various time quantities. |
||||||
|
# - The timing field width accommodates up to hundreds of days. |
||||||
|
# - The accounting records corresponding to job steps are eliminated. |
||||||
|
|
||||||
|
FIELDS_PRESET1=JobID,JobIDRaw,JobName%-20,User,Partition,Elapsed%12,NCPUS%5,CPUTime%12,TotalCPU%12,Submit,Start,End |
||||||
|
|
||||||
|
filter_sacct_only_main_jobs () { |
||||||
|
awk '($2 ~ /^[0-9]+$/) || (FNR <= 2) { print }' |
||||||
|
} |
||||||
|
|
||||||
|
sacct -o $FIELDS_PRESET1 "$@" \ |
||||||
|
| filter_sacct_only_main_jobs |
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in new issue