diff options
author | Alejandro Colomar <alx@nginx.com> | 2023-06-06 13:16:07 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@nginx.com> | 2023-06-27 17:45:43 +0200 |
commit | e165801732defc5726a3c727b83e31bc3369026f (patch) | |
tree | 801bdda3b3d50d263ce456d225aec72324efe27c /tools | |
parent | 7d6851055b1f0c31a28a74a10f2c74380145fa4c (diff) | |
download | unit-e165801732defc5726a3c727b83e31bc3369026f.tar.gz unit-e165801732defc5726a3c727b83e31bc3369026f.tar.bz2 |
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: <https://github.com/nginx/unit/issues/875>
Link: <https://github.com/nginx/unit/issues/886>
Link: <https://github.com/nginx/unit/pull/885>
Cc: <https://github.com/mattxtaz>
Cc: Liam Crilly <liam@nginx.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/setup-unit | 2 |
1 files changed, 1 insertions, 1 deletions
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'} \ |