Writing memory in Linux

Is there a way to write memory? Thus, after the process is complete, we can still access it.

A typical way to check memory is as follows:

$ cat /proc/PID/status 

But in no way exists after the completion of the process.

+6
linux unix memory-footprint
source share
3 answers

you can do something like:

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

when the program finishes, you will have a list of memory traces with time in log .

+5
source share

Valgrind has a Massif memory profiler that contains detailed information about the memory usage of your program:

Massif is a heap profiler. It performs detailed heap profiling by taking regular snapshots of the heap of programs. He creates a graph showing heap usage over time, including information on which parts of the program are responsible for most memory allocations. The graph is supplemented by a text or HTML file that contains additional information to determine where most of the memory is allocated. Massif runs programs about 20 times slower than usual.

+4
source share

You can write it using munin + custom plugin.

This will allow you to easily track and save the necessary information about the process and easily graphically.

Here is the related answer I gave on serverfault.com

+2
source share

All Articles