How do I measure how many kilobytes of memory for a fast UNIX program?
April 22, 2010 3:50 PM Subscribe
UNIX. There's /usr/bin/time to measure how much time a unix command needs to finish. What's the equivalent for spitting out how much memory a unix command needed to allocate to finish it's work?
posted by Mozai to technology (5 answers total) 3 users marked this as a favorite
Everything I found so far (like cat /proc/$$/* or /usr/bin/top) is for getting how much memory a currently-running process is using, but that's an instantaneous measurement, and it also supposes the command runs long enough that you can switch to another terminal and get your snapshot. I'm hoping to find out "this shell script consumed 2MB over the course of it's short-but-sweet lifetime" or such.