allow passing a cluster argument to sacct

This commit is contained in:
2026-07-08 15:50:09 +02:00
parent 2bdda23d6a
commit 14e3f6427b
+4
View File
@@ -689,6 +689,8 @@ def run_sacct(args: argparse.Namespace) -> list[dict[str, str]]:
cmd += ["-u", args.user]
if args.state:
cmd += ["--state", args.state]
if args.cluster:
cmd += ["--cluster", args.cluster]
# print(f"DEBUG: sacct cmd: {cmd}")
@@ -1590,6 +1592,8 @@ def parse_args(argv: list[str]) -> argparse.Namespace:
p.add_argument("--state", "--job-state", dest="state",
default=None,
help="state filter passed to sacct, e.g. COMPLETED,FAILED,TIMEOUT [default: get all states]")
p.add_argument("--cluster", help="cluster(s) for which to collect information (passed to sacct command)")
# Aggregation related options
p.add_argument("-U", "--aggr_user", action="store_true", help="aggregate jobs by user, CPUs, nodes, ReqMem, and timelimit")
p.add_argument(