[Bug 4826] If 'args' is specified as a column name to 'ps -o', any column names given after args are ignored

bugzilla at busybox.net bugzilla at busybox.net
Thu Mar 1 09:44:36 UTC 2012


https://bugs.busybox.net/show_bug.cgi?id=4826

--- Comment #2 from Dan Nye <dan at coedit.co.uk> 2012-03-01 09:44:35 UTC ---
(In reply to comment #1)
> > Whereas this shows only the args column:
> > 
> > ps -o args -o user -o group
> 
> This is caused by the large width of args column by default - it is 2048 chars.
> The total width of ps output is capped by the same value, therefore any columns
> after args are never visible - they are truncated.
> 
> Try this:
> 
> ps -o args=ARGS.................. -o user -o group
> 
> This will specify the header, and therefore the width of args column to be less
> than the default.

That works a treat, thanks, and has also helped me to understand why this
didn't work for me earlier:

ps -o user,args=aheading,group

I guess people might want to put commas in column headers, and so this is
unlikely to change :-)

I guess my only suggestions would be:

1) Update the list of strings returned by 'ps -o meh' to put 'args' at the end.
This would avoid people unfamiliar with the situation spending a long time
trying to work out why the list of columns they've copied and pasted verbatim
fails to show all the columns that the help text says it supports

2) Update the 'usage' screen for ps to show this list. Due to size limitations,
many BusyBox installations lack a manual. It was only after giving for the
supported commands that I took a guess, got it wrong, and then got the help
text.

3) Why not update the default column width for 'args' to be less than the width
of the terminal, assuming the output is printed to the screen?

Thanks for clearing the mystery up for me :-)

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list