[Aboriginal] Replace ADDR with BIT in ps -l?

Rob Landley rob at landley.net
Mon Feb 6 15:34:23 PST 2017


On 02/04/2017 01:03 PM, enh wrote:
> without a tty is the default for Android, where most folks are using
> "adb shell ..." or moral equivalent. (similar to running everything
> via ssh.) so you can't really tell the difference between "i'm a
> programmatic use" and "i'm a human hiding behind something like ssh".
> 
> -w would certainly be less disruptive for Android use cases (because
> it won't break scripts; traditional Android ps _always_ overflowed).

Ok, that's in, and I think I've fixed all the weirdness (and top isn't
re-querying endlessly, although I need to change top not to do a screen
clear but instead to [K kill each line before redrawing it, so the
display doesn't flicker so badly when drawn via serial).

But, one more issue: on an 80 char terminal "ps -Al" leaves _four_
characters for CMD. And when the last one's + that means there's
actually 3 it's displaying.

The main culprit is "ADDR", which needs lots more space to display real
data on 64 bit systems. But it's not usually very useful (wchan is more
useful) and only does this for your own processes unless run as root.

Unfortunately removing it would break scripts that count fields with awk
or similar, so

So I suggest replacing ADDR with BIT, which leaves 13 chars for CMD?
(Much more readable.) We could also trim one space from TTY (at least on
my system, I haven't seen pts/123 go to 4 digits yet so there's always a
blank space).

Elliott: would this break obvious android stuff?

Rob


More information about the Aboriginal mailing list