lkml.org 
[lkml]   [2002]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectProcess Memory Usage
Hi,

I want to find the memory usage of a particular process, to be precise
the percentage memory utilization. I need to find it through a program
other than "top".

1) I tried using getrusage() system call. But it is returning zero for
all values(like ru_maxrss, etc..) except ru_utime and ru_stime. I am using
2.2.18 kernel.

2) I tried to read from /proc/<pid>/statm file. But, the process memory
usage seems to be always in an increasing trend, even though lot of
freeing is going on inside. All the values, size, resident, are always
increasing.

Can anyone suggest me any other ways through which memory utilization
of a program can be obtained.

Thanking you in advance,
ntk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.039 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site