Re: AW: Query on Linux 'top' command for oracle user
- From: Yong Huang <yong321@xxxxxxxxx>
- To: karlarao@xxxxxxxxx
- Date: Fri, 22 Oct 2010 10:08:19 -0700 (PDT)
> Yes too bad it's not available on <RHEL5,
I don't know if this command can help you:
#Red Hat 4, sum of Oracle $ORACLE_SID instance process resident memory
(supposedly private)
SGA=<number from `show sga' sqlplus command>
(for i in `ps -fu oracle | grep $ORACLE_SID | grep -v grep | awk '{print $2}'`;
do echo "`ps -orss= -p $i`*1024-$SGA" | bc; done) | awk '{sumrss+=$1} END
{print sumrss}'
If the above is messed up, go to
http://yong321.freeshell.org/osnotes/FreqCmds.txt
> the same way I'm feeling for iotop here
> http://people.redhat.com/jolsa/iotop/ which is a very useful tool
For older Linux, just use atop:
http://www.atoptool.nl
I thought iotop was written by Guillaume Chazarain at
http://guichaz.free.fr/iotop/
But maybe they somehow work together.
Ever since kernel 2.6.18-164 added /proc/<pid>/io, it's a simple matter
of reading and sorting. Even I can write a program to do it, called topio:
http://yong321.freeshell.org/freeware/pio.html#linux
and it's just two simple Perl scripts. No RPM is needed. Slightly before
kernel 2.6.18-164, you may be able to have /proc/<pid>/io by configuring
TASK_DELAY_ACCT and TASK_IO_ACCOUNTING in kernel and rebuild.
Yong Huang
--
http://www.freelists.org/webpage/oracle-l
Other related posts: