LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-23-2006, 03:39 AM   #1
kishore_mca
LQ Newbie
 
Registered: May 2006
Posts: 1

Rep: Reputation: 0
Memory Used by a process in Linux


How to find the memory utilized by a parent process in Linux?

If there is 1 main process and 3 child processes for that, I want to know how much memory is being used in total by the 1 parent and 3 child processes. I know only PPID.

We are using Redhat AS 2.1. In our application, one Java process is creating 100s of threads. I want to know the total amount of memory is being used by that process.

Thanks in advance,
Kishore
 
Old 05-23-2006, 04:48 AM   #2
spirit receiver
Member
 
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
How about the following?
Code:
(size=0; count=0; for i in $(ps --no-headers --pid=PPID --ppid=PPID -o rss); do (( size += i, count++ )); done; echo "$size KB in $count processes.")
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to list the process using most memory adoyee Linux - Newbie 3 09-06-2012 03:11 AM
Process cannot get more memory kutta_kamina Programming 3 12-08-2005 01:41 PM
process memory ecampos02 Linux - Newbie 5 11-18-2005 04:42 PM
Help Configuring the Memory Used by a Process in RedHat? (Cache Memory on CPU) geogecko Linux - General 3 02-23-2005 03:32 PM
Maximum Memory PER PROCESS anewsome Linux - General 1 03-08-2004 02:29 PM


All times are GMT -5. The time now is 02:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration