From: Al Boldi <a1426z@gawab.com>
To: linux-kernel@vger.kernel.org
Cc: linux-c-programming@vger.kernel.org
Subject: Re: max heap usage of a Linux process
Date: Tue, 14 Nov 2006 14:39:38 +0300 [thread overview]
Message-ID: <200611141439.38048.a1426z@gawab.com> (raw)
In-Reply-To: <17753.41267.125633.668756@cerise.gclements.plus.com>
Glynn Clements wrote:
> Prasanta Sadhukhan wrote:
> > Actually, I have the process-pid(s) and I want to find out
> > programmatically, what's the max heap size that had been consumed by
> > that process at any given moment(based on user command) from another
> > process.
>
> Then you need to read the files in /proc/<pid>/*. There isn't a system
> call to get resource usage for another process.
Wow, really? Reading /proc/<pid>/* is pretty expensive, especially if you
have to do it for 1000's of procs.
That's probably why top is such a cpu-hog.
Thanks!
--
Al
next prev parent reply other threads:[~2006-11-14 11:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-13 13:31 max heap usage of a Linux process Prasanta Sadhukhan
2006-11-13 14:09 ` Markus Rechberger
2006-11-13 15:39 ` Dan Gary
2006-11-13 15:59 ` Markus Rechberger
2006-11-13 16:12 ` Christ, Bryan
2006-11-14 6:26 ` Prasanta Sadhukhan
2006-11-14 10:57 ` Glynn Clements
2006-11-14 11:30 ` Prasanta Sadhukhan
2006-11-14 14:36 ` Glynn Clements
2006-11-14 11:39 ` Al Boldi [this message]
2006-11-14 15:19 ` Christ, Bryan
2006-11-13 15:30 ` Christ, Bryan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200611141439.38048.a1426z@gawab.com \
--to=a1426z@gawab.com \
--cc=linux-c-programming@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).