From 8f704e2f0de070dfac212f0f844008f1b89e3fcd Mon Sep 17 00:00:00 2001 From: Albert Chu Date: Fri, 31 Mar 2023 14:41:14 -0800 Subject: [PATCH] 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. --- src/cmd/flux-jobs.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cmd/flux-jobs.py b/src/cmd/flux-jobs.py index 5211fb67694c..bcbde411ffc1 100755 --- a/src/cmd/flux-jobs.py +++ b/src/cmd/flux-jobs.py @@ -60,6 +60,13 @@ class FluxJobsConfig(UtilConfig): "{priority:<12} {state:<8.8} {dependencies}" ), }, + "endreason": { + "description": "Show why each job ended", + "format": ( + "{id.f58:>12} ?:{queue:<8.8} {username:<8.8} {name:<10.10+} " + "{status_abbrev:>2.2} {t_inactive!d:%b%d %R::>12h} {inactive_reason}" + ), + }, } def __init__(self):