From owner-cvs-usrbin Mon Jul 14 18:00:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA25382 for cvs-usrbin-outgoing; Mon, 14 Jul 1997 18:00:28 -0700 (PDT) Received: from spinner.dialix.com.au (spinner.dialix.com.au [192.203.228.67]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id RAA25293; Mon, 14 Jul 1997 17:59:53 -0700 (PDT) Received: from spinner.dialix.com.au (localhost.dialix.com.au [127.0.0.1]) by spinner.dialix.com.au with ESMTP id IAA04464; Tue, 15 Jul 1997 08:58:59 +0800 (WST) Message-Id: <199707150058.IAA04464@spinner.dialix.com.au> X-Mailer: exmh version 2.0delta 6/3/97 To: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= cc: Adam David , 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 In-reply-to: Your message of "Tue, 15 Jul 1997 03:26:06 +0400." Date: Tue, 15 Jul 1997 08:58:59 +0800 From: Peter Wemm Sender: owner-cvs-usrbin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk =?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 > > http://www.nagual.pp.ru/~ache/ > Cheers, -Peter