LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-23-2003, 01:44 AM   #1
srinivasar
LQ Newbie
 
Registered: Sep 2003
Location: Chennai
Posts: 7

Rep: Reputation: 0
Swapped out memory size


Hi,

I am working on finding out the memory usage of my application for past few todays.

I too posted some question's here earlier.

Ok now i come to know that the
Memory Usage = Resident size + Swaped out memory size of the particular process.

I can get the Resident set size through ps command.

I want to know , how i can find the Swapped out memory size of the particular process.

second question

As my application spawn's 'n' threads , to calculate memory usage , whether, i need to consider all the threads or the memory usage of the parent process is enough.

Pl. help me

Thanks in advance
 
Old 09-23-2003, 07:25 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 4,045

Rep: Reputation: Disabled
Here is the brutal way (if you have enough RAM): disable swap. Type:
swapoff /dev/hdx
with x the letter of your swap partition.
Then compare with the usage when swap is on.
 
Old 09-23-2003, 04:09 PM   #3
driedlinger
LQ Newbie
 
Registered: Aug 2003
Distribution: RH 7.3, 8, 9
Posts: 13

Rep: Reputation: 0
try this:
ps -aux |grep -v CPU | awk '{print "UID: " $1 " " "%MEM: " $4 " " "VMSZ: " $5 " " "RESMSZ: " $6" " "CMD:" $11}' | sort -nk 4,4

VMSZ Virtual memory size in bytes.
REMSMZ Resident Set Size

check the man on proc for greater detail
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tool to detect number of memory slots, memory module type, speed, and size stefanwolf Linux - Hardware 8 04-22-2013 09:48 AM
is shared memory expandable in memory size? Thinking Programming 4 08-16-2005 09:57 AM
Swapped memory with 1GB? gmontag79 Red Hat 0 02-09-2005 12:33 PM
SWAP memory size ust Linux - Software 3 12-02-2003 06:42 PM
Swapped out memory size srinivasar Linux - General 0 09-23-2003 01:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:33 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration