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

enh enh at google.com
Mon Feb 6 16:46:46 PST 2017


On Mon, Feb 6, 2017 at 3:34 PM, Rob Landley <rob at landley.net> wrote:
> 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?

it's hard to be 100% sure (because of ps' weird command-line parsing),
but afaics from internal code search, no scripts or code use ps' "l"
option.

sounds fine to me, and i'll deal with anything should it break.

> Rob



-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.


More information about the Aboriginal mailing list