Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Find memory used by a process

RE: Find memory used by a process

From: Reidy, Ron <Ron.Reidy_at_arraybiopharma.com>
Date: Tue, 2 Aug 2005 17:02:21 -0600
Message-ID: <17CAB0BF27BCFC47B0E4554A0E2F962B873223@fiji.arraybp.com>


The Tcl script will work under Solaris. Also, did you try looking at /proc/PID/status to see the format of the data? You may still be able to use a shell command to get the data.  



Ron Reidy
Lead DBA
Array BioPharma, Inc.

-----Original Message-----
From: raja rao [mailto:raja4list_at_yahoo.com] Sent: Tuesday, August 02, 2005 5:00 PM
To: Reidy, Ron; oracle-l_at_freelists.org
Subject: RE: Find memory used by a process

Hi Ron,  

Thanks for your mail.  

At present I am unfortunate becoz, we are using solaris and in next year i will fortunate, becoz we are migrating the systems to linux.  

Anyway thanks for the reply.  

raJ

"Reidy, Ron" <Ron.Reidy_at_arraybiopharma.com> wrote:

Raj,  

This took a little digging, but here are the answers:  

  1. I assume you are using Linux. If not, this may not be correct ...

The /proc filesystem will provide you with the data you want. To see the size of memory consumption, issue this command:  

cat /proc/PID/status | egrep '(^Vm)' | cut --field=2 --delimiter=':'  

The above will yield the sizes of all the segments of memory the process is using at the time the command is issued. Add them up, and that is your total memory consumption for the process. This information can be parsed using the Perl module Linux::stat. For those who do not know or care to use Perl (GAAA!), there is a Tcl script here ( http://ldas-cit.ligo.caltech.edu/doc/tcl_docs/html/procfstcl.html - procfs.tcl) which may do the same thing.  

If you are leery about using Perl, Tcl, or looking directly at the /proc filesystem, consult the ps(1) man page on your system.  

2. For sorting using the 'ps' command, you will need to consult the sort(1) man page on your system.  

3. PGA memory is seen in v$session. For SGA usage, I'm also not sure about this at this time.  

I also highly recommend the book Optimizing Linux Performance. This book is very good with lots of tool and usage suggestions for monitoring and diagnosing Linux performance.  

Happy investigating.  



Ron Reidy
Lead DBA
Array BioPharma, Inc.

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]On Behalf Of raja rao Sent: Monday, August 01, 2005 7:19 PM
To: oracle-l_at_freelists.org
Subject: Find memory used by a process

Hi All,  

when I issue
ps -efl |grep 7309
 8 S oracle 7309 1 0 46 22 ? 504289 ? Jul 27 ? 0:01 oracledev (LOCAL=NO)  

it is giving the memory used by this process is 504K. Where as when I did the top or pmap for this process

it is showing around 4GB (which includes shared mem and private mem)  

Can someone throw somelight on this, what is the exact memory used by the above process ?  

(also how to get the sort by SIZE column in ps -efl
 

(and how to get the details from oracle database howmuch mem being used by a session).
 

Thanks in advance
Raj  



Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

This electronic message transmission is a PRIVATE communication which contains information which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. Please notify the sender of the delivery error by replying to this message, or notify us by telephone (877-633-2436, ext. 0), and then delete it from your system.



Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

This electronic message transmission is a PRIVATE communication which contains information which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. Please notify the sender of the delivery error by replying to this message, or notify us by telephone (877-633-2436, ext. 0), and then delete it from your system.

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Aug 02 2005 - 18:11:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US