From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,8e5c812f9134818a X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2000-12-20 14:32:48 PST Path: supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!cyclone.bc.net!cyclone-sjo1.usenetserver.com!news-out.usenetserver.com!cyclone-pass-sjo.usenetserver.com!cyclone1.usenetserver.com!e420r-sjo2.usenetserver.com.POSTED!not-for-mail From: Frank J. Perricone Newsgroups: comp.unix.tru64 Subject: Re: "top" utility Organization: Vermont Department of Liquor Control Message-ID: References: <90r6f0$qcg$1@newsg3.svr.pol.co.uk> <3A3F90DB.EEF62589@ford.com> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@usenetserver.com X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly. X-Complaints-To: abuse@webusenet.com NNTP-Posting-Date: Wed, 20 Dec 2000 17:43:23 EST Date: Wed, 20 Dec 2000 17:32:12 -0500 Xref: supernews.google.com comp.unix.tru64:1275 On Tue, 19 Dec 2000 11:46:19 -0500, Jack Patteeuw wrote: > KISS ... and it works for multiple CPUs !!! > > echo %CPU "USER PID PPID TTY %MEM S STARTED > TIME PSR COMMAND" > ps -e -opcpu= -ouser= -opid= -oppid= -otty= -opmem= -ostate= -ostart= > -otime= -opsr= -ocommand= | sort -rn | head -n 20 In ksh, replace the 20 with ${1:-20} and it allows you to type "top 5" or "top 10" or whatever, while still allowing just "top". -- Frank J. Perricone frank@dlc.state.vt.us IT Manager 802-828-4926 Vermont Department of Liquor Control Fax: 802-828-2803 http://www.state.vt.us/dlc/ http://www.sover.net/~hawthorn/