Skip to content

Added sacct parsing for past jobs#37

Open
thomas-w-nl wants to merge 1 commit intokarimknaebel:mainfrom
thomas-w-nl:main
Open

Added sacct parsing for past jobs#37
thomas-w-nl wants to merge 1 commit intokarimknaebel:mainfrom
thomas-w-nl:main

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

@karimknaebel
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)

@karimknaebel
Copy link
Owner

karimknaebel 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.

@karimknaebel
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

@karimknaebel
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