flux-core
flux-core copied to clipboard
add -h flag for no header in flux resource drain for streamlined monitoring
much like sinfo -h
if we can add a -h
flag to flux so that when running flux resource drain
the header does not appear so when running it in a script across all clusters, the header does not continue to output everytime. For example the output would go from this;
TIMESTAMP STATE RANK REASON NODELIST 2022-09-11T09:06:44 drained 15 broker was unresponsive fluke18 2022-08-15T15:57:08 drained 63 broker was unresponsive fluke66
To this;
2022-09-11T09:06:44 drained 15 broker was unresponsive fluke18 2022-08-15T15:57:08 drained 63 broker was unresponsive fluke66
Good idea!
Since -h often used for help, I'd vote we be consistent with flux-jobs(1) which has:
-n, --suppress-header
For default output, do not output column headers.
I agree being more consistent would be better
while we're at it, should we introduce more things to make flux resource
and flux-jobs
more alike? (Edit: also taking #4673 in mind here). thoughts that come to mind:
- named formats
- extra verbosity turned into --format=long
Good points @chu11. I looked at this as part of #4670, but there are very few available fields for flux resource list|drain
so it seemed like a fair bit of code for little benefit. (Note however, this issue is about flux resource drain
not flux resource list
, which already has a -n, --no-header
option)
Actually after reading the other issue @chu11, maybe you have a point...