From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,c990a63777c167ea X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-10-30 15:21:05 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.media.kyoto-u.ac.jp!news1.optus.net.au!optus!news.mel.connect.com.au!dpham From: dpham@mercy.com.au (Zoong Pham) Newsgroups: comp.unix.tru64 Subject: Re: Who know where this command is........ Date: 30 Oct 2001 23:21:03 GMT Organization: Customer of Connect.com.au Pty. Ltd. Message-ID: References: <3bd9bf77.75939525@news.telusplanet.net> Reply-To: dpham@mercy.com.au NNTP-Posting-Host: 210.9.192.246 X-Trace: perki.connect.com.au 1004484063 877 210.9.192.246 (30 Oct 2001 23:21:03 GMT) X-Complaints-To: abuse@connect.com.au NNTP-Posting-Date: 30 Oct 2001 23:21:03 GMT User-Agent: slrn/0.9.7.0 (SunOS) Xref: archiver1.google.com comp.unix.tru64:5600 I am running 5.1. Only 3.5beta5 got compiled/run OK on my box. Other versions compiled OK but core dump when run. You can try this script, it does what I need: #!/bin/ksh # usage: top_arg.sh [number_of_process] [interfal] [occurance] counter=0 while [ counter -lt ${3:-2} ] do clear 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 ${1:-20} counter=`expr $counter + 1` sleep ${2:-5} done Hope it helps. In article , jing wrote: > Thank you for everyone! > After I compiled the top source files,I can see a top file in > /usr/local/bin,but a new problem knocked me down: when I executed top > command,an error appeared: > #top > Memory fault -- core dumped > > Why does this happen?Maybe my MEM is too small?128M,and 40704K free. -- Zoong Pham UNIX Systems Administrator Mercy Health and Aged Care Inc. East Melbourne, Australia E-mail: dpham@mercy.com.au Tel: +61 3 9270 2646 Mob: +61 4 0803 6911 Fax: +61 3 9270 2802