[lug] /usr/bin/time: memory stats?

Steve Sullivan sullivan at mathcom.com
Sun Mar 14 13:24:47 MDT 2010


Hi,

I'm interested in getting memory use statistics on various apps.
Top can do it, but I need it in a shell script like this:

/usr/bin/time -f "cpuTime: %S  elapTime: %e  avgK: %K  \
  maxRes: %M avgRes: %t " someCommand ...

But at least on my system (Debian 5.0.4, Linux 2.6.26-2-686)
all the memory use statistics are always 0.  Am I missing
some feature to enable them?

Sample output:
cpuTime: 0.11  elapTime: 2.46  avgK: 0  maxRes: 0  avgRes: 0

Thanks,

Steve

-- 

========================================
Steve Sullivan    sullivan at mathcom.com

http://www.mathcom.com
========================================



More information about the LUG mailing list