Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> script to calculate memory usage by oracle processes in AIX ?
Hi All,
the env is oracle 9.2.0.4/AIX5.2
in order to calculate the memory used by each oracle server process on AIX,i am using the following method (as said in a metalink doc 123754.1):
$ps -ef | grep oracledev01 | grep -v grep | awk '{print $2}'
this gives me the PID of all oracle server process.around 60 in my case.here dev01 is my ORACLE_SID.
Then...
$ps v <2023464> | awk '{print $7-$10}
this gives me the memory used by one oracle server process.
i have to replace the PID within <> above and do it for 60 processes.
so i made it like
$ps -ef | grep oracledev01 | grep -v grep | awk '{print $2}' | xargs ps v <2023464> | awk '{print $7-$10}
but this just gives the output for the first process only and not all 60 processes .excuse me for my poor scripting.i am new to it.How do i do this in a small shell/perl script ? can someone help me ?
Regards,
Prem.
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Thu Jul 08 2004 - 22:23:56 CDT