when using --format with sacct and you justify the columns to the left, the header fields do not justify the same way. sacct -a --format=jobid%-6,cluster%-10,user%-10,jobname%-20 just as a personable preference, i like the headers to be left or center justified and any column that contains text should be left and anything that's strictly a number to be right but i understand that might overly complexify the code. at least having the headers follow the column selection would make it less noticeable. as an additional enhancement, it would be nice if the --starttime accepted something like -7d instead of making me figure out what the date was a week ago :)
Michael, I agree, having the header match the column looks better. We went ahead and made the change, but as it isn't technically a bug fix it won't be published until 21.08 is released. See commit b79069d3cdafaa0764c084b4c1cf89f0dc8e14ad on github However, we will do not plan to center justification or have it automatically change based on data type. For your final request, you are in luck. I added this feature just a month ago and it was released in 20.11 The syntax is: now[{+|-}count[seconds(default)|minutes|hours|days|weeks]] Example: sacct --starttime=now-7days -Scott