Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added sacct parsing for past jobs #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thomas-w-nl
Copy link

Hi,

I wanted to be able to view past completed jobs as well, so I added parsing of sacct to include this.
Not very familiar with rust, so hopefully the code is allright

Thanks

@kabouzeid
Copy link
Owner

thanks! i will have to check this later.

btw, you can also already pass --states=all to include recently completed jobs (last 5 mins or so, because their state is PD)

@kabouzeid
Copy link
Owner

kabouzeid commented Feb 13, 2025

do you think it makes more sense to completely ditch squeue and get running job info from sacct as well?

@thomas-w-nl
Copy link
Author

It does indeed provide info on the running jobs too, however squeue and sacct provide slightly different information such fields stdout,sterr,command,ArrayJobID,ArrayTaskID which are not available in sacct .

I think you would get into trouble with array jobs, as these aren't listed in sacct i think, but i have not tested this extensively.
Tbh I would keep using squeue for the running jobs, and append the completed jobs with sacct as i am doing now.

@kabouzeid
Copy link
Owner

I see, thanks. stdout is the most important field for me, as following the logs is the primary purpose of this tool.

@thomas-w-nl
Copy link
Author

thomas-w-nl commented Feb 13, 2025

Following the logs does work tho! Because the workdir is provided by sacct. But it might break if you use custom file names, so it's not great.
The logs for past completed runs is also my primary purpose

@kabouzeid
Copy link
Owner

not robust enough for me. I usually save logs in a central location as to not spam my project root with these files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants