0

I'm trying to find memory usage stats for processes after they finish (on Linux). Is there a way to do this?

I know I can get this data while a process is running by looking in /proc/{id}/status, but that file is gone after the process dies.

  • Why not doing it while the process is running? – Khaled Nov 23 '10 at 8:10
  • Maybe he's trying to find out why it died. – Stefan Wolff Nov 23 '10 at 13:30
  • I'm trying to include memory-usage in some benchmark data (from another program that starts these up), but I won't know the real peak usage till after the processes die. – Adam Wagner Nov 23 '10 at 15:23
0

How about this: http://tstarling.com/blog/2010/06/measuring-memory-usage-with-strace/

0

atop has a daemon mode, which will log various kinds of resource use by individual processes.

The debian package runs it as /usr/bin/atop -a -w /var/log/atop.log 600. You can access the data with sudo atop -r, and navigate to a time the system was loaded, or your application died, using t and T. There are various ways to present the data as well, similar to other top tools.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.