Date: Tue, 15 Jul 1997 08:58:59 +0800 From: Peter Wemm <peter@spinner.dialix.com.au> To: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.pp.ru> Cc: Adam David <adam@veda.is>, peter@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-usrbin@FreeBSD.ORG Subject: Re: cvs commit: src/usr.bin/top machine.c Message-ID: <199707150058.IAA04464@spinner.dialix.com.au> In-Reply-To: Your message of "Tue, 15 Jul 1997 03:26:06 %2B0400." <Pine.BSF.3.96.970715032207.12329A-100000@lsd.relcom.eu.net>
next in thread | previous in thread | raw e-mail | index | archive | help
=?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= wrote: > On Mon, 14 Jul 1997, Adam David wrote: > > > > Why config file is ever needed? True dynamic behaviour (not at startup > > > only but each time displayed) will be enough. > > > > Fixed width is less overhead, some people might prefer that display. > > It is possible for sysadmin to determine in advance which field width > > to use, and change it without having to hack and/or recompile. > > It is no overhead to count max over several hundreds of processes. ps > already does it and you not notice. Output time gives much more overhead. ps and top are completely different. In ps, it takes a snapshot of all the currently running processes and finds the largest username to determine the final output format. Top *cannot* do the same thing because the list of processes is not final. What if somebody else logs in? (Unix is multi-user after all). What top probably needs to do is implement runtime column resizing and start at 8 characters. When and if a process turns up with more than the current column size, then do a complete screen clear and redraw with the larger column size. This is painful because top is a simple termcap application. The result is that the screen will have several redraws as the field is expanded beyond 8 characters. There should probably also be some sort of shrink as well so that it will resize back to the largest name seen in (say) the last 60 seconds after a while. > -- > Andrey A. Chernov > <ache@null.net> > http://www.nagual.pp.ru/~ache/ > Cheers, -Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707150058.IAA04464>