From owner-freebsd-current@FreeBSD.ORG Thu Jul 8 20:54:48 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83EC416A4CE for ; Thu, 8 Jul 2004 20:54:48 +0000 (GMT) Received: from bilbo.otenet.gr (bilbo.otenet.gr [195.170.0.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAAE343D55 for ; Thu, 8 Jul 2004 20:54:47 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b172.otenet.gr [212.205.244.180]) i68Ks6wL008012; Thu, 8 Jul 2004 23:54:06 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.11/8.12.11) with ESMTP id i68Ks4iH033973; Thu, 8 Jul 2004 23:54:04 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.11/8.12.11/Submit) id i68Ks3Ci033968; Thu, 8 Jul 2004 23:54:03 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 8 Jul 2004 23:54:03 +0300 From: Giorgos Keramidas To: Dan Nelson Message-ID: <20040708205403.GA48751@gothmog.gr> References: <20040707124751.GA66588@orion.daedalusnetworks.priv> <20040708163751.GN95729@elvis.mu.org> <20040708170731.GI57155@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040708170731.GI57155@dan.emsphone.com> X-Mailman-Approved-At: Fri, 09 Jul 2004 11:44:56 +0000 cc: current@freebsd.org Subject: Re: RFC: Sorting in top -m io X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 20:54:48 -0000 On 2004-07-08 12:07, Dan Nelson wrote: > docs are still missing: manpage, top Usage string, and "?" help all > need to describe the -m flag and 'm' key. Since there's room, > context-switch info would also be neat to display. Hi, I don't like writing in nroff -man which is a bit too `primitive' when compared with mdoc, but here is the patch I mentioned earlier: Does this look ok? Should I add more details? If yes, what about? %% Index: top.X =================================================================== RCS file: /home/ncvs/src/contrib/top/top.X,v retrieving revision 1.10 diff -u -r1.10 top.X --- top.X 1 Jul 2004 09:12:38 -0000 1.10 +++ top.X 8 Jul 2004 20:50:23 -0000 @@ -90,7 +90,7 @@ process. .TP .BI \-m display -Display either 'cpu' or 'io' statistics. Default is 'cpu'. +Display either 'cpu' or 'io' statistics. The default display mode is 'cpu'. .TP .B \-n Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq @@ -221,6 +221,8 @@ .TP .B m Toggle the display between 'cpu' and 'io' modes. +Note that this affects the sort order of the displayed processes, +as different sort keys are available in each mode. .TP .B n or # Change the number of processes to display (prompt for new number). @@ -247,8 +249,16 @@ .B o Change the order in which the display is sorted. This command is not available on all systems. The sort key names vary fron system to system -but usually include: \*(lqcpu\*(rq, \*(lqres\*(rq, \*(lqsize\*(rq, -\*(lqtime\*(rq. The default is cpu. +and depend on the current display mode of +.IR top . +.IP +The available sort keys usually include: +\*(lqcpu\*(rq, \*(lqres\*(rq, \*(lqsize\*(rq, and \*(lqtime\*(rq. +These are the same sort keys that are available when the 'cpu' mode is +used. The default sort key of this mode is \*(lqcpu\*(rq. +.IP +The sort keys that can be used in the 'io' display mode are: +\*(lqtotal\*(rq, \*(lqread\*(rq, \*(lqwrite\*(rq, and \*(lqfault\*(rq. .TP .B e Display a list of system errors (if any) generated by the last %%