LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-24-2004, 02:49 AM   #1
basu_arani
LQ Newbie
 
Registered: Sep 2003
Location: Bangalore, India
Distribution: Red Hat
Posts: 19

Rep: Reputation: 0
Gathering Memory Statistics


I want to program a memory monitoring system, which gathers information regarding, which process is being allocated with the memory dynamically.

What is the procedure to collect the memory statics of a particular process.

This program is being programmed in Red Hat Linux 9 with kernel version 2.4

Kindly Help.
 
Old 07-24-2004, 02:57 AM   #2
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
Your best bet is to intercept malloc(), free(), etc. to monitor what's going on. There's already a lot of these programs out there if you're not really looking to learn how, but just want the functionality. If you just want to find the data segment's break point you can look at /proc/<pid>/status. There's some memory information in there for each process, but the values only grow in <page_size> chunks.
 
  


Reply



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
memory statistics alaios Linux - General 7 09-06-2005 09:21 AM
Database Gathering Adler Linux - General 0 10-28-2004 08:48 PM
Information Gathering xathras Linux - Networking 4 06-28-2004 01:23 PM
Magic The Gathering and IE tcaptain LinuxQuestions.org Member Success Stories 7 04-06-2004 03:50 PM
Linux gathering Ztyx Linux - General 1 06-29-2002 03:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:04 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
Open Source Consulting | Domain Registration