Measuring RAM usage of a program
I have a process, which is quite short-running (about 10 minutes), but memory heavy.
I want to know how much memory does the process uses at its peak. I want some way to track it, more efficient than running
htop and writing down the memory usage every 20 seconds.
Ideally, I would like something like
time - some way to write
and the command would run and at the end, the memory usage would be shown. However, I will survive manually writing the
pid somewhere; I just don't want to watch
htop and writing it down.