From e165801732defc5726a3c727b83e31bc3369026f Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Tue, 6 Jun 2023 13:16:07 +0200 Subject: Tools: setup-unit: ps: forcing full lines from ps(1). Some ps(1) implementations trim lines to 80 columns, even if the output is being piped. Let's force ps(1) to output full lines with `ww`, which is not in POSIX, but seems to be portable enough. On 2023-06-08 13:19, Andrew Clayton wrote: > Just for posterity... > > BusyBox ps(1) knows about a grand total of 2 options! > > BusyBox v1.35.0 (2022-11-19 10:13:10 UTC) multi-call binary. > > Usage: ps [-o COL1,COL2=HEADER] [-T] > > Show list of processes > > -o COL1,COL2=HEADER Select columns for display > -T Show threads > > But at least it doesn't make it worse. In fact all of these three do > exactly the same thing > > ps > ps ax > ps axww > > I.e it ignores any non option argument... > > It does however help on OpenIndiana... Link: Link: Link: Cc: Cc: Liam Crilly Reviewed-by: Andrew Clayton Signed-off-by: Alejandro Colomar --- tools/setup-unit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/setup-unit b/tools/setup-unit index bde5834a..c95d7b35 100755 --- a/tools/setup-unit +++ b/tools/setup-unit @@ -1031,7 +1031,7 @@ unit_ps() shift; done; - ps ax \ + ps awwx \ | if test -v type; then grep ${type_c:+-e 'unit: controller'} \ ${type_m:+-e 'unit: main'} \ -- cgit