why doesn't /usr/bin/time command return maximum resident set size (instead it returns always 0) and how to measure it then?

Thx

Recommended Answers

All 2 Replies

Sorry if I misunderstand.

/usr/bin/time just returns the amount of time spent processing your request - generally the actual time and how much was spent processing user (software) and kernel (os).
With -al, it will show you that - this is probably what you're looking for, but I believe you need to be running something that takes a long time to run for it to ever register and it also rounds down and measures by the k.
There's a tool out there called "valgrind" that has a "massif" option that would probably show you what you want.
Check out "valgrind" in wikipedia. Hopefully that's what you're looking for :)

, Mike

I read in man that /usr/bin/time can also get maximum and average resident set size if you specify it in the output format, but it always return 0 instead. Hm, sorry for my stupid question, but there isn't any -al option and what is k? I cannot use valgrind because as i quick read it says that it isn't actually executing tested program.

Charles

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.