Hi Rob landley
thank you for posting my 'top -m ' command support request to toybox mailing list Regards Department | Linux BSP +86 1866690-6337 5 / F, East Block, Tang Tang Building, Tairan Road, Shenzhen 5 / F, East Tower, Sheng Tang Building, No.9 Tai Ran Road, Shenzhen, China [OnePlus.net]<http://oneplus.net/> [Facebook] <http://facebook.com/oneplusofficial> [Twitter] <http://twitter.com/oneplus> [LinkedIn] <https://www.linkedin.com/company/oneplus> [cid:58961610-cbef-40f3-a2ea-9a85ab22d8e4] <http://weibo.com/oneplusmobile?refer_flag=0000015010_&from=feed&loc=nickname> This message may be confidential, and its contents should not be reproduced without prior written consent. ________________________________ From: Rob Landley <[email protected]> Sent: 25 September 2017 20:24:09 To: [email protected] Subject: Re: Regarding toybox 'top' command options support I've cc'd my reply to the toybox mailing list, but removed the identifying info from the submitter rather than do the "can I post this" round trip. (They can reply publicly if they like.) On 09/22/2017 07:26 AM, XXX wrote: > Dear Rob Landley > > I have gone through toybox code developed by you. > I need small information regarding code changes > required to support 'top -m ' command. I tried "top -m" on ubuntu and it didn't know what that was... > In toolbox(old version) , support 'top -m x'command to > display <x> lines from 'top' command output. During normal operation you can override the secreen size detection via the environment variable $LINES, ala: LINES=10 top But that doesn't affect -b mode... > But this '-m' option is not supported yet in toybox code. My assumption was if you're using "top -bn1" you'd pipe it through "head -n ##", to trim the output, but I suppose I can see it being useful for multiple -b output iterations... > So could you please let me know the source code changes > that are need to be done in top_common() function > present in toybox/toys/posix/ps.c file.? I.E. this is a feature request to add -m to top? :) Hey Elliott, given this was an android addition to begin with, what do you think? (It's easy enough to add...) Rob P.S. Poking at this, top and iotop have a common option block but -H and -O weren't applied to iotop so either they should be or the options should be moved to the earlier quoted string in the NEWTOY macro to mark them as not common... And -O differs because iotop uses it to mean something else. But maybe -H can be shared...
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
