Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
measuring maximum memory usage of a process
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
stazz
n00b
n00b


Joined: 18 Jun 2004
Posts: 37

PostPosted: Sat Aug 13, 2011 1:07 am    Post subject: measuring maximum memory usage of a process Reply with quote

Hi all,

I need an automated way to measure (within a reasonable ballpark) the maximum memory usage of programs during thousands of performance-measurement runs. I don't care if I'm measuring pages, bytes, shared, private, etc, so long as I know what I'm measuring.

I can't impact run time too much, so valgrind is not an option. I'm also not in favor of any solution that needs to poll ps or proc all the time. I've been searching around, but can't seem to find anything appropriate for my needs. I've tried the %M output format option for time (very appealing since all these runs are timed anyway), but it seems to always give 0.

Any suggestions?
Back to top
View user's profile Send private message
theotherjoe
Guru
Guru


Joined: 22 Nov 2003
Posts: 393

PostPosted: Sat Aug 13, 2011 7:35 am    Post subject: Reply with quote

Have a look at /proc/PID/{stat|statm|status} and
the format description of those files in the kernel documentation
/usr/src/linux/Documentation/filesystems/proc.txt
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum