| Summary: | If 'args' is specified as a column name to 'ps -o', any column names given after args are ignored | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Dan Nye <dan> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED WONTFIX | ||
| Severity: | normal | CC: | busybox-cvs, dan |
| Priority: | P5 | ||
| Version: | 1.19.x | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Dan Nye
2012-03-01 01:56:48 UTC
> 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.
(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 :-) (In reply to comment #2) > 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? Because a simple cmd like "ps -o args" would show less information than it can. Now it is optimal: it uses entire screen width. |