CLIP-HPC / SlurmCommander

Slurm TUI
MIT License
60 stars 6 forks source link

User set Slurm start time specifier (instead of days) #15

Closed hv15 closed 1 year ago

hv15 commented 1 year ago

The -d flag of scom lets users set how many days back in the job history to query for. This boils down to a call of sacct -S now-Ndays (other flags omitted) where N is what was passed with -d. The start time specifier supports other ranges and units of time which might be useful for the user, additionally there is also the -E flag (i.e. endtime) which can be combine with -S to create an arbitrary time range to query for job history.

I propose adding the options to set parameters for both flags through the TUI (maybe a pop up box?).

pja237 commented 1 year ago

This is an excellent proposal since JobHistTab is the only tab that does not refresh automatically in the background (ok, templates as well), and it's not really possible (without quitting) to get new data. So this would be double-useful.

One possible way would be to do something similar to how filter works (lot of code could be recycled there). On a specified key (e.g. 't' for time-range') open two textinput fields (also used for filtering), one after the other, Start and End and let user specify the range for switches -S/-E. Rest should be minor changes to sacct call.

I will not have time to tackle this until February (handling the move to another country), so if you got time and will to attack this, just open a PR and i'll try my best to reply asap... if not, i'll go after it as soon as i'm free again.