
|
RE: Find memory used by a process
- From: "Reidy, Ron" <Ron.Reidy@xxxxxxxxxxxxxxxxxx>
- To: <raja4list@xxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
- Date: Tue, 2 Aug 2005 16:51:10 -0600
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@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]On
Behalf Of raja rao
Sent: Monday, August 01, 2005 7:19 PM
To: oracle-l@xxxxxxxxxxxxx
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.
Other related posts:Find memory used by a process Find memory used by a process RE: Find memory used by a process RE: Find memory used by a process RE: Find memory used by a process
|

|

|
[ Home |
Signup |
Help |
Login |
Archives |
Lists
]
All trademarks and copyrights within the FreeLists archives are owned
by their respective owners. Everything else ©2008 Avenir Technologies, LLC.
|

|
|