
|
RE: Find memory used by a process
- From: "Reidy, Ron" <Ron.Reidy@xxxxxxxxxxxxxxxxxx>
- To: "raja rao" <raja4list@xxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
- Date: Tue, 2 Aug 2005 17:02:21 -0600
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@xxxxxxxxx]
Sent: Tuesday, August 02, 2005 5:00 PM
To: Reidy, Ron; oracle-l@xxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxx> 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@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.
__________________________________________________
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.
|

|
|