Ticket 10410 - sacct headers not justified
Summary: sacct headers not justified
Status: RESOLVED FIXED
Alias: None
Product: Slurm
Classification: Unclassified
Component: User Commands (show other tickets)
Version: 20.02.5
Hardware: Linux Linux
: 4 - Minor Issue
Assignee: Scott Hilton
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2020-12-09 11:28 MST by Michael DiDomenico
Modified: 2020-12-09 16:38 MST (History)
1 user (show)

See Also:
Site: IDACCR
Slinky Site: ---
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
Google sites: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
NoveTech Sites: ---
Nvidia HWinf-CS Sites: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Tzag Elita Sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed: 21.08.0pre1
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments

Note You need to log in before you can comment on or make changes to this ticket.
Description Michael DiDomenico 2020-12-09 11:28:42 MST
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 :)
Comment 5 Scott Hilton 2020-12-09 16:38:19 MST
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