From owner-freebsd-stable@FreeBSD.ORG Thu May 12 12:48:44 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5389C16A4CE; Thu, 12 May 2005 12:48:44 +0000 (GMT) Received: from mail.helenmarks.co.uk (mail.helenmarks.co.uk [82.68.196.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD52243D67; Thu, 12 May 2005 12:48:43 +0000 (GMT) (envelope-from dom@goodforbusiness.co.uk) Received: from localhost (localhost [127.0.0.1]) by mail.helenmarks.co.uk (Postfix) with ESMTP id DD5AE222404; Thu, 12 May 2005 13:48:42 +0100 (BST) Received: from mail.helenmarks.co.uk ([127.0.0.1]) by localhost (mail.helenmarks.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 71848-09; Thu, 12 May 2005 13:48:34 +0100 (BST) Received: from egg.helenmarks.co.uk (egg.helenmarks.co.uk [192.168.15.3]) by mail.helenmarks.co.uk (Postfix) with ESMTP id B8DAB222402; Thu, 12 May 2005 13:48:34 +0100 (BST) From: Dominic Marks Organization: GoodforBusiness.co.uk To: Giorgos Keramidas , freebsd-stable@freebsd.org Date: Thu, 12 May 2005 13:49:31 +0100 User-Agent: KMail/1.8 References: <1115815807.8809.3.camel@buffy.york.ac.uk> <20050512103929.GB1320@orion.daedalusnetworks.priv> In-Reply-To: <20050512103929.GB1320@orion.daedalusnetworks.priv> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505121349.31508.dom@goodforbusiness.co.uk> X-Virus-Scanned: By ClamAV 0.80 Subject: Re: Strange top(1) output X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2005 12:48:44 -0000 On Thursday 12 May 2005 11:39, you wrote: > On 2005-05-11 13:50, Gavin Atkinson wrote: > >> Ah, yes! Good thought. This could affect the width of the USERNAME > >> column and push everything too far to the right. If this is the case, > >> I'd probably vote for optionally limiting the length of the username > >> column to, say, 8 columns at most. > > > > I would also vote for limiting it to 8 characters. Even with longer > > usernames, I suspect 8 characters will be enough to identify particular > > users (and if it's not there is always they UID view). > > That's an option too. I'm currently trying to get top to display > something like this (80 columns are used for text, so use a slightly > wider terminal to view this properly: > > --------------------------------------------------------------------------- >----+ last pid: 11090; load averages: 1.27, 1.26, 0.86 up 0+01:11:11 > 03:07:43| 71 processes: 3 running, 68 sleeping | > CPU states: 11.2% user, 0.0% nice, 77.1% system, 0.8% interrupt, 10.9% > idle | Mem: 50M Active, 348M Inact, 70M Wired, 20M Cache, 60M Buf, 6340K > Free | Swap: 5000M Total, 5000M Free | > > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU COMMAND/NTHR > | 4738 root 108 0 1360K 836K RUN 1:28 22.80% find/1 > | 638 giorgos -8 0 13496K 4672K pcmwr 1:33 1.03% mpg123/1 > | 11062 giorgos 96 0 2428K 1520K RUN 0:00 1.54% > top/1 | > --------------------------------------------------------------------------- >----+ If you don't mind I will share my thoughts on these changes. > > This includes at least the following changes (some not visible): > > + The entire header line is limited to the window width too. > + The USERNAME column is hard-limited to 8 characters. This makes me a little uneasy. Its a typical idiom, at least at my Business, to have usernames which are of the form 'firstnamelastname', for this reason they can be quite long and often the first 5-8 characters will be frequently repeated, for example the following contrived names: rogermoore -> rogermoo rogermoody -> rogermoo charlottelane -> charlott charlottedaniels -> charlott If there are many processes (samba, imap, etc) running as these users (also typical in my environment, and I guess elsewhere too). If I use top to view the active processes now I will be unable to tell what is really going on. I know that I could run top and just display the UIDs, or I could use ps, but top is great for seeing the status at a glance, so loosing this information entirely in top would make life harder. Also, imagine a system where you have 200 users with UIDs ranging from 2000 to 2200. Picking out and distinguishing between lots of these numbers from a moving top display, is likely to be a very error prone task, no? I suppose it could be argued that using usernames of that format is a poor choice on my part, and if that is the consensus of opinion then I'll have to look at fixing my own setup. I use long format usernames because it do not wish to have to remember that rm5, rmoore (many other possible ways) is a particular person. If this behaviour could be turned on and off, I'd be very happy. > + The THR column is displayed as /1 after the COMMAND, like the > prstat(1M) command of recent Solaris versions. I like this. > + The CPU/WCPU columns occupy the same space and can be toggled with > the 'C' keyboard command. I like this too. > + When UID numbers are displayed, hitting 'u' will read a UID instead > of a username. > + When the view is toggled between processes/threads, the NTHR part > becomes the thread ID of the particular thread. Okay, not really sure what this will look like to me but no need to explain I'll wait until they hit -CURRENT and see for myself. > Hopefully, I'll have these changes running on CURRENT before the weekend. > > If no strong objections are voiced for any of these changes, I'll test > it on CURRENT for a while, then ask for approval of a commit to HEAD and > merge it to 5-STABLE after it's been tested enough on CURRENT. Thanks for your work ! > - Giorgos -- Dominic GoodforBusiness.co.uk I.T. Services for SMEs in the UK.