Revision b9b5abcb scripts/gnt-job
b/scripts/gnt-job | ||
---|---|---|
80 | 80 |
"oplog": "OpCode_log", |
81 | 81 |
"summary": "Summary", |
82 | 82 |
"opstart": "OpCode_start", |
83 |
"opexec": "OpCode_exec", |
|
83 | 84 |
"opend": "OpCode_end", |
84 | 85 |
"start_ts": "Start", |
85 | 86 |
"end_ts": "End", |
... | ... | |
106 | 107 |
val = ",".join(val) |
107 | 108 |
elif field in ("start_ts", "end_ts", "received_ts"): |
108 | 109 |
val = FormatTimestamp(val) |
109 |
elif field in ("opstart", "opend"): |
|
110 |
elif field in ("opstart", "opexec", "opend"):
|
|
110 | 111 |
val = [FormatTimestamp(entry) for entry in val] |
111 | 112 |
elif field == "lock_status" and not val: |
112 | 113 |
val = "-" |
... | ... | |
212 | 213 |
|
213 | 214 |
selected_fields = [ |
214 | 215 |
"id", "status", "ops", "opresult", "opstatus", "oplog", |
215 |
"opstart", "opend", "received_ts", "start_ts", "end_ts", |
|
216 |
"opstart", "opexec", "opend", "received_ts", "start_ts", "end_ts",
|
|
216 | 217 |
] |
217 | 218 |
|
218 | 219 |
result = GetClient().QueryJobs(args, selected_fields) |
... | ... | |
235 | 236 |
continue |
236 | 237 |
|
237 | 238 |
(job_id, status, ops, opresult, opstatus, oplog, |
238 |
opstart, opend, recv_ts, start_ts, end_ts) = entry |
|
239 |
opstart, opexec, opend, recv_ts, start_ts, end_ts) = entry
|
|
239 | 240 |
format(0, "Job ID: %s" % job_id) |
240 | 241 |
if status in _USER_JOB_STATUS: |
241 | 242 |
status = _USER_JOB_STATUS[status] |
... | ... | |
275 | 276 |
else: |
276 | 277 |
format(1, "Total processing time: N/A") |
277 | 278 |
format(1, "Opcodes:") |
278 |
for (opcode, result, status, log, s_ts, e_ts) in \ |
|
279 |
zip(ops, opresult, opstatus, oplog, opstart, opend): |
|
279 |
for (opcode, result, status, log, s_ts, x_ts, e_ts) in \
|
|
280 |
zip(ops, opresult, opstatus, oplog, opstart, opexec, opend):
|
|
280 | 281 |
format(2, "%s" % opcode["OP_ID"]) |
281 | 282 |
format(3, "Status: %s" % status) |
282 | 283 |
if isinstance(s_ts, (tuple, list)): |
283 | 284 |
format(3, "Processing start: %s" % FormatTimestamp(s_ts)) |
284 | 285 |
else: |
285 | 286 |
format(3, "No processing start time") |
287 |
if isinstance(x_ts, (tuple, list)): |
|
288 |
format(3, "Execution start: %s" % FormatTimestamp(x_ts)) |
|
289 |
else: |
|
290 |
format(3, "No execution start time") |
|
286 | 291 |
if isinstance(e_ts, (tuple, list)): |
287 | 292 |
format(3, "Processing end: %s" % FormatTimestamp(e_ts)) |
288 | 293 |
else: |
Also available in: Unified diff