Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recording Memory Footprint In Linux

Is there a way we can record memory footprint? In a way that after the process has finish we still can have access to it.

The typical way I check memory footprint is this:

$ cat /proc/PID/status

But in no way it exist after the process has finished.

like image 457
neversaint Avatar asked Jun 02 '09 07:06

neversaint


1 Answers

you can do something like:

watch 'grep VmSize /proc/PID/status >> log'

when the program ends you'll have a list of memory footprints over time in log.

like image 169
Nathan Fellman Avatar answered Sep 28 '22 07:09

Nathan Fellman