[Toybox] top UI question.
enh
enh at google.com
Wed Jan 20 19:12:45 PST 2016
sgtm, especially because Android's traditional fields are different
from the desktop's traditional fields, so being like ps (where you can
specify exactly what you want, with a suitable desktop/Android default
supplied) works for me. it also gives me an opportunity to switch to
the traditional desktop fields for interactive use (by not having an
Android special case there) but keep the traditional Android fields
for "bugreport" use (where people are more likely to notice/care).
On Wed, Jan 20, 2016 at 3:48 PM, Rob Landley <rob at landley.net> wrote:
> I got top checked in, and there are still some glitches (the initial
> CPU usage display is 100% times however many cpu ticks the process
> managed to get in a quarter second, the TIME+ display is showing
> amount used since LAST display, not cumulative... There's internal
> plumbing issues for these), but it's basically working. I still need
> to make the up/down keys switch the sort order, but left and right
> change the sort fields.
>
> Controlling WHICH fields to display is next up. The way ubuntu's top
> does it is the f and o keys pull up modal dialogs with each field
> assigned a letter. Except I'm still adding fields so letters would
> move around (unless I put them in the array, and I don't want to go
> there).
>
> What I'd really RATHER do is just hook up the -o and -k options that
> ps is already using. Why do it _differently_? This is a "historical
> usage" vs "consistent usage" thing. (I'm unaware of busybox
> implementing this at all, so...)
>
> The downside is you'd have to exit top and restart it to change the
> fields displayed or the sort order, but command line history makes
> that relatively easy. (q cursor up, edit, enter) if you know what
> fields you want. (The menu does show you the available fields, but so
> does ./ps --help and unlike ubuntu's top, mine are the same ones. In
> fact top and iotop are the same plumbing with different main()
> functions, if hook up -o and -k they more or less collapse together
> and become different default values.)
>
> Other downside: iotop already assigned -k and -o (kilobytes and only
> active) so I'd need something like -K and -O. I'd probably bump
> iotop's to -K kilobytes and -O only active, and have -k -o match ps...
>
> Anyway, anybody have opinions on this before I do it?
>
> Rob
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net
--
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 Toybox
mailing list