I regularly use time
to find out how long a process takes. Is there an equivalent command for memory? The usual ways to find out how much memory a process takes (ps
,/proc/meminfo
, etc.) work fine for a long-running process, but I don't know of anything that works like time
does, for a command run from the command line. I'm imaging something like "size", except that includes the stack and heap:
% mem python myscript.py
text data heap
3135006 570928 115528