From: dpham@mercy.com.au (Zoong Pham)
Subject: Re: Who know where this command is........
Date: 30 Oct 2001 23:21:03 GMT [thread overview]
Message-ID: <slrn9tucno.ate.dpham@snowdon.mercy.com.au> (raw)
In-Reply-To: a22a0b3c.0110292324.45d4f3c3@posting.google.com
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 <a22a0b3c.0110292324.45d4f3c3@posting.google.com>, 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
prev parent reply other threads:[~2001-10-30 23:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-26 8:02 Who know where this command is jing
2001-10-26 8:55 ` Jacques Garnier
2001-10-26 19:58 ` Trevor Osatchuk
2001-10-30 7:24 ` jing
2001-10-30 23:21 ` Zoong Pham [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox