Skip to content

status: align output columns#85

Merged
bertschinger merged 1 commit into
lanl:mainfrom
ofaaland:b-status-column-width
Jun 16, 2026
Merged

status: align output columns#85
bertschinger merged 1 commit into
lanl:mainfrom
ofaaland:b-status-column-width

Conversation

@ofaaland

Copy link
Copy Markdown
Contributor

Since the resource name lengths vary significantly, the "\t" was not sufficient to align the output columns.

iron1/mgs	(llnl/lustre)   Running on iron1
iron2	(llnl/zpool)    Running on iron2

Add field widths to the print() calls so the output is aligned.

iron1/mgs               (llnl/lustre)   Running on iron1
iron2                   (llnl/zpool)    Running on iron2

Also, add a newline below the table of resources since the content below (Connected hosts, etc.) is two columns wide instead of 5 or more, and is different in kind (lists of hosts vs resources).

Since the resource name lengths vary significantly, the "\t" was not
sufficient to align the output columns.

iron1/mgs	(llnl/lustre)   Running on iron1
iron2	(llnl/zpool)    Running on iron2

Add field widths to the print() calls so the output is aligned.

iron1/mgs               (llnl/lustre)   Running on iron1
iron2                   (llnl/zpool)    Running on iron2

Also, add a newline below the table of resources since the content
below (Connected hosts, etc.) is two columns wide instead of
5 or more, and is different in kind (lists of hosts vs resources).
@ofaaland

Copy link
Copy Markdown
Contributor Author

The column width I chose was almost arbitrary, and fixed. Perhaps there's a better way.

@bertschinger

Copy link
Copy Markdown
Collaborator

The column width I chose was almost arbitrary, and fixed. Perhaps there's a better way.

I think this is good enough. I'm happy with incremental improvements on the status output. Besides, if someone really wants ultra-customized output, they can always use curl to get the raw JSON and write their own wrapper script:

$ curl --unix-socket halo.socket http://localhost/status | jq .

@bertschinger bertschinger merged commit d395972 into lanl:main Jun 16, 2026
1 check passed
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