Formatting changes to pbs_rstat -f output

#1

Hi,

This is just a formatting change proposal for pbs_rstat -f output. All PBS commands’ long format output follows the norm that every new attribute is printed with 4 leading spaces. But pbs_rstat -f output is printed without any leading spaces. So, I thought it’d be more consistent with the rest of the PBS commands to add the leading spaces in pbs_rstat -f output. The tiny design document is here:

https://pbspro.atlassian.net/wiki/spaces/PD/pages/1233649679/Formatting+changes+to+pbs+rstat+-f+output

Please provide comments/feedback. Thanks.

0 Likes

#2

@agrawalravi90 I like the proposal. :+1:
One small request, please add a link on the design page back to this forum discussion page. Thanks!

0 Likes

#3

Thanks @lisa-altair! I’ve added a link to this forum post in the document.

0 Likes

#4

Hey @agrawalravi90
I like the change. You should get buy-in from PBS Control that it won’t mess them up. Either that or give them enough lead time to update their pbs_rstat parsing routines.

Bhroam

0 Likes

#5

Thanks Bhroam, I gave them a heads-up.

0 Likes

#6

I am concerned that this change will possibly mess up other user tools consuming pbs_rstat output as well, for very little benefit.

0 Likes

#7

Thanks for your input Scott.

I think the benefit is for future tools that want to parse PBS outputs, they won’t have to make a special case for pbs_rstat -f.
If it breaks any existing tools then I kind of feel like it’ll be a pretty easy fix for them.

I’d like to hear others’ thoughts, if the consensus is that this is a bad idea then I won’t proceed with it.

0 Likes

#8

Hi @agrawalravi90, if we are worried about user tools/scripts that do not yet exist then my preference would be to do to pbs_rstat what we did for qstat and pbsnodes and provide optional JSON and DSV output formats. Though honestly I don’t think we have ever been directly asked for this feature in pbs_rstat up to present.

I don’t think this is a BAD idea, I just don’t want to change the fundamental output format that has been around forever for no tangible added benefit.

0 Likes

#9

Ok, I understand your concern, and I agree that json/dsv would be better for machine parsing. Thanks for the explanation.

0 Likes