Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-16-2009, 08:12 AM   #1
LQ Newbie
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
pmap or /proc/<pid>smap or /proc/<pid>/status

Hey guys, i'm new here in the forums and to linux as well, I hope this is the right section to ask my question if not then I apologize and would be grateful if it is moved to the right section.

Okay i'm trying to create a small script as part of my application, i'm trying to get accurate memory information in terms of memory consumption PURELY from the process itself EXCLUDING any shared libraries and etc that are loaded.

I have used pmap, smap from /proc and status from /proc.

I get varying answers and not sure which to take, for example pmap and /proc/<pid>/status give same virtual memory but slightly differ on the private and shared memory information.

smap is quite extensive and i'm not which part to interpret and count for getting the private non-shared memory.

So any help on these different values or if they mean different things or calculated different or anything like that would be helpful.

Also another question, if in my script i open up a file say for example a txt or even an xml file to write to, does the size of that file get counted towards the private non-shared memory space or?

Any help is greatly appreciated,
thank you.

Last edited by iQoder; 07-16-2009 at 07:34 PM.
Old 07-16-2009, 07:32 PM   #2
LQ Newbie
Registered: Jul 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Any help anyone? Or could a moderator maybe move this to the programming section, maybe it's more suitable there?


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
uid and gid fileds from /proc/pid/status sanjaykhuntia Linux - Enterprise 2 02-11-2011 02:35 PM
Is there any system function/api to get values like /proc/<pid>/status ??? kunalnandi Linux - Newbie 2 05-02-2009 02:22 AM
/proc/pid/status , is the data related to all the threads of the process...... linuxdoniv Programming 2 08-07-2008 12:51 AM
how to read /proc/pid/status in sched.c linuxdoniv Programming 3 07-21-2008 10:49 PM
VmSize : Regarding /proc/<pid>/status shivaligupta Programming 0 04-06-2006 05:33 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:33 AM.

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