Document mqlog in the README - #65
Conversation
Add an mqlog section covering the no-argument default (most recent finished job, with the fallback warning when it has no log file), looking up a specific job ID, -f/--failed for the most recent job that exited non-zero, -e/--stderr and -o/--stdout for a single stream, and the pager behaviour. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wjx1QNqCHEChB3H6bj93F7
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b86800b5e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
|
|
||
| # mqlog | ||
| `mqlog` prints the stdout and stderr of a finished PBS job, so you don't have to hunt down the `.OU`/`.ER` files yourself. With no arguments it shows the most recently finished job belonging to you, working out the log paths from `qstat` (including the per-job `<jobid>.OU` / `<jobid>.ER` files that `mqsub --segregated-log-files` writes into a directory). If the newest finished job left no log behind, it walks back through your finished jobs until it finds one that did and prints a warning saying which job it is actually showing: |
There was a problem hiding this comment.
Correct the claimed completion-time ordering
When finished jobs complete out of submission order, this does not necessarily show the most recently finished job: get_finished_job_ids() sorts IDs numerically, so a newer, long-running job can finish after a higher-numbered short job yet lose selection. Describe this as the highest-numbered finished job, or change the implementation to order by an actual completion timestamp.
Useful? React with 👍 / 👎.
|
|
||
|
|
||
| # mqlog | ||
| `mqlog` prints the stdout and stderr of a finished PBS job, so you don't have to hunt down the `.OU`/`.ER` files yourself. With no arguments it shows the most recently finished job belonging to you, working out the log paths from `qstat` (including the per-job `<jobid>.OU` / `<jobid>.ER` files that `mqsub --segregated-log-files` writes into a directory). If the newest finished job left no log behind, it walks back through your finished jobs until it finds one that did and prints a warning saying which job it is actually showing: |
There was a problem hiding this comment.
Document the 400-job fallback limit
For users with more than 400 finished jobs, the fallback does not always walk backward until it finds a log: iter_job_info() stops at MAX_JOBS_SCANNED = 400. If those 400 jobs have no remaining logs but an older job does, mqlog exits with “No finished jobs with log files found,” contrary to this promise; qualify the fallback limit or remove the cap.
Useful? React with 👍 / 👎.
Add an mqlog section covering the no-argument default (most recent
finished job, with the fallback warning when it has no log file),
looking up a specific job ID, -f/--failed for the most recent job that
exited non-zero, -e/--stderr and -o/--stdout for a single stream, and
the pager behaviour.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01Wjx1QNqCHEChB3H6bj93F7