2

I use time command to measure the time used to execute a file as:

     time ./filename  

My question: are there any command like time can give the memory used by executing an executable file in linux?

Rock
  • 51
  • 7
  • The alternative: simply run a command like htop in another terminal; and select your compilation process. Good enough to get you a basic understanding on resource usage. – GhostCat Oct 24 '16 at 07:25
  • Possible duplicate of [How to profile memory usage?](http://stackoverflow.com/questions/4690800/how-to-profile-memory-usage) – Michael Foukarakis Oct 24 '16 at 08:27

1 Answers1

1

You can use /usr/bin/time -v ./filename. It will print a lot of information including memory use.

Note:

time ./filename

Will use the shell built-in time command.

mkj
  • 2,761
  • 5
  • 24
  • 28