Skip to content

acheronfail/max_rss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

max_rss

A small utility to measure resident set size (rss) of a process.

I created this because the I wanted to track the memory usage of programs in https://github.com/acheronfail/count, but the max_rss value from Linux's getrusage is inaccurate.

How does it work?

It uses Linux's ptrace api (man 2 ptrace) and tracks when the process forks, clones or exits, and sums up the Resident Set Size from each process where appropriate.

If you go through various Linux man pages, you'll discover that the max_rss field from getrusage isn't accurate, and also that man 5 proc mentions its rss field and some others are inaccurate. It recommends reading /proc/$PID/smaps instead.

Hence the need for this program. Here are also some other people I've found encountering the same thing:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors