Skip to content

Commit 8f704e2

Browse files
committed
flux-jobs: add endreason output format
Problem: Now that the inactive_reason output field is available, it would be nice if there were a convenient format to output it and other pertinent information related to it. Solution: Add a new "endreason" output format.
1 parent 8e3c857 commit 8f704e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cmd/flux-jobs.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ class FluxJobsConfig(UtilConfig):
6060
"{priority:<12} {state:<8.8} {dependencies}"
6161
),
6262
},
63+
"endreason": {
64+
"description": "Show why each job ended",
65+
"format": (
66+
"{id.f58:>12} ?:{queue:<8.8} {username:<8.8} {name:<10.10+} "
67+
"{status_abbrev:>2.2} {t_inactive!d:%b%d %R::>12h} {inactive_reason}"
68+
),
69+
},
6370
}
6471

6572
def __init__(self):

0 commit comments

Comments
 (0)