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.

Adam Wagner
  • 103
  • 3

2 Answers2

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.

Tobu
  • 4,437
  • 1
  • 24
  • 31