I am trying to use the time / usr / bin / time command to measure the peak memory consumption of a program on a linux system. Regardless of which executable I am experimenting with, I get the correct answer as regards runtime, but the memory usage figures are always 0.
a typical time result is something like:
8.68user 0.04system 0: 08.73 element 99% CPU (0avgtext + 0avgdata 0maxresident) k 0inputs + 16outputs (0major + 20366minor) pagefaults 0swaps
zeros that I don't understand:
0avgtext + 0avgdata 0maxresident
I googled around, and I believe that GNU time is actually not able to calculate the memory usage data that is mentioned on its man page. I'm right? What is an alternative command that I could use with the same effect? (without having to execute valgrind)
Arkie alderton
source share