You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help=f"Select for completed job states ({COMPLETED_STATES}) You need to specify --starttime (-S) at some point in the past, due to how saccont default works (for example '-S now-1week'). This option automatically sets '-E now'")
help=f"Select for finished job states ({ENDED_STATES}) You need to specify --starttime (-S) at some point in the past, due to how saccont default works (for example '-S now-1week'). This option automatically sets '-E now'. Not compatible with --db.")
704
+
parser.add_argument('--completed', action='store_true', help=f"Like --ended but {COMPLETED_STATES}")
705
+
parser.add_argument('--cancelled', action='store_true', help=f"Like --ended but {CANCELLED_STATES}")
706
+
parser.add_argument('--failed', action='store_true', help=f"Like --ended but {FAILED_STATES}")
707
+
parser.add_argument('--running-at-time', metavar='TIME', help="Only jobs running at this time. Not compatible with --db. Expanded to --start=TIME --end=TIME --state=R.")
# Set args.user to None. We have already handled it here and
@@ -1107,7 +1120,10 @@ def compact_table():
1107
1120
1108
1121
SACCT_DEFAULT_FIELDS="JobID,User,State,datetime(Start, 'unixepoch') AS Start,datetime(End, 'unixepoch') AS End,Partition,ExitCodeRaw,NodeList,NCPUS,CPUtime,CPUEff,AllocMem,TotalMem,MemEff,ReqGPUS,GPUEff,TotDiskRead,TotDiskWrite,ReqTRES,AllocTRES,TRESUsageInTot,TRESUsageOutTot"
1109
1122
SACCT_DEFAULT_FIELDS_LONG="JobID,User,State,datetime(Start, 'unixepoch') AS Start,datetime(End, 'unixepoch') AS End,Elapsed,Partition,ExitCodeRaw,NodeList,NCPUS,CPUtime,CPUEff,AllocMem,TotalMem,MemEff,ReqMem,MaxRSS,ReqGPUS,GPUEff,GPUUtil,TotDiskRead,TotDiskWrite,ReqTRES,AllocTRES,TRESUsageInTot,TRESUsageOutTot"
1110
-
COMPLETED_STATES='CA,CD,DL,F,NF,OOM,PR,RV,TO'
1123
+
ENDED_STATES='CA,CD,DL,F,NF,OOM,PR,RV,TO'
1124
+
COMPLETED_STATES='CD'
1125
+
CANCELLED_STATES='CA,DL'
1126
+
FAILED_STATES='F,NF,OOM,TO'
1111
1127
defsacct_cli(argv=sys.argv[1:], csv_input=None):
1112
1128
"""A command line that uses slurm2sql to give an sacct-like interface."""
help=f"Select for completed job states ({COMPLETED_STATES}) You need to specify --starttime (-S) at some point in the past, due to how saccont default works (for example '-S now-1week'). This option automatically sets '-E now'. Not compatible with --db.")
1141
-
group.add_argument('--running-at-time', metavar='TIME', help="Only jobs running at this time. Not compatible with --db. Expanded to --start=TIME --end=TIME --state=R.")
help=f"Select for finished job states ({ENDED_STATES}) You need to specify --starttime (-S) at some point in the past, due to how saccont default works (for example '-S now-1week'). This option automatically sets '-E now'. Not compatible with --db.")
1158
+
state_grp.add_argument('--completed', action='store_true', help=f"Like --ended but {COMPLETED_STATES}")
1159
+
state_grp.add_argument('--cancelled', action='store_true', help=f"Like --ended but {CANCELLED_STATES}")
1160
+
state_grp.add_argument('--failed', action='store_true', help=f"Like --ended but {FAILED_STATES}")
1161
+
state_grp.add_argument('--running-at-time', metavar='TIME', help="Only jobs running at this time. Not compatible with --db. Expanded to --start=TIME --end=TIME --state=R.")
1142
1162
# --db compatibility
1143
1163
group=parser.add_argument_group(description="Selectors that also work with --db:")
1144
1164
group.add_argument('--user', '-u', help="Limit to this or these users. Compatible with --db.")
help=f"Select for completed job states ({COMPLETED_STATES}) You need to specify --starttime (-S) at some point in the past, due to how saccont default works (for example '-S now-1week'). This option automatically sets '-E now'. Not compatible with --db.")
1212
-
group.add_argument('--running-at-time', metavar='TIME', help="Only jobs running at this time. Not compatible with --db. Expanded to --start=TIME --end=TIME --state=R.")
help=f"Select for finished job states ({ENDED_STATES}) You need to specify --starttime (-S) at some point in the past, due to how saccont default works (for example '-S now-1week'). This option automatically sets '-E now'. Not compatible with --db.")
1233
+
state_grp.add_argument('--completed', action='store_true', help=f"Like --ended but {COMPLETED_STATES}")
1234
+
state_grp.add_argument('--cancelled', action='store_true', help=f"Like --ended but {CANCELLED_STATES}")
1235
+
state_grp.add_argument('--failed', action='store_true', help=f"Like --ended but {FAILED_STATES}")
1236
+
state_grp.add_argument('--running-at-time', metavar='TIME', help="Only jobs running at this time. Not compatible with --db. Expanded to --start=TIME --end=TIME --state=R.")
1213
1237
# --db compatibility
1214
1238
group=parser.add_argument_group(description="Selectors that also work with --db:")
1215
1239
group.add_argument('--user', '-u', help="Limit to this or these users. Compatible with --db.")
0 commit comments