[Toybox] ps and top (and Android)

Rob Landley rob at landley.net
Mon Apr 25 23:59:45 PDT 2016


On 04/23/2016 11:13 AM, enh wrote:
> On Sat, Apr 23, 2016 at 3:06 AM, Rob Landley <rob at landley.net> wrote:
>>>> Android's top is showing thread count as field #5, and "PCY" (scheduling
>>>> policy) as field #8. And that's fetched with infrastructure that doesn't
>>>> exist on Ubuntu: get_sched_policy() and get_sched_policy_name(). Um,
>>>> does this need to be fixed up too? (My top has "pr" and "ni" in the
>>>> default output. You can add SCHED with -o, but it's numeric, and the
>>>> help text doesn't match the android fields (audio?).)
>>>
>>> yeah, don't worry about that stuff --- i'll send you patches for those
>>> things later. (it's more cutils cruft. it's hairy enough and changes
>>> from release to release that i think it would be a mistake for toybox
>>> to try to do it itself.)
>>
>> Works for me. Lemme see what I can do with ps...

I added -T to ps, and "-o tid,tcnt,bit".

Does that cover it, or is there more?

I haven't done top or pgrep yet. Open to suggestions on what changes I
should make to top, actually. (New default behavior should be...?)

Rob


More information about the Toybox mailing list