Re: [dev] [OFFTOPIC] How to know the size of a process?

From: Premysl Hruby <dfenze_AT_gmail.com>
Date: Sun, 24 Jan 2010 18:42:59 +0100

On (24/01/10 18:35), pmarin wrote:
> Date: Sun, 24 Jan 2010 18:35:31 +0100
> From: pmarin <pacogeek_AT_gmail.com>
> To: dev_AT_suckless.org
> Subject: [dev] [OFFTOPIC] How to know the size of a process?
> List-Id: dev mail list <dev.suckless.org>
>
> Hi all.
> Anyone know how to know the size (kb) of a process in Linux?
> using the proc filesystem I can know the number of pages that it uses
> (/proc/pid/statm). How I can convert
> it to kb? Any posix way?
>
> pmarin
>

You can get size of page very easily, man sysconf and search for
PAGESIZE. Btw, There's one issue with trying to get size of process --
shared memory. To which process should it count? And how? Or count only
fraction for each of process using that shared memory ... Not easy. :-)

-Ph

-- 
Premysl "Anydot" Hruby, https://www.redrum.cz/
-
I'm a signature virus. Please add me to your signature and help me spread!
Received on Sun Jan 24 2010 - 17:42:59 UTC

This archive was generated by hypermail 2.2.0 : Sun Jan 24 2010 - 18:00:03 UTC