Как ни странно, у вас time
может быть ответ, но на этот раз он должен быть не встроенным в оболочку, time
а автономным:
$ /usr/bin/time -v uname
Linux
Command being timed: "uname"
User time (seconds): 0.00
System time (seconds): 0.00
Percent of CPU this job got: 2%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.12
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 896
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 1
Minor (reclaiming a frame) page faults: 304
Voluntary context switches: 3
Involuntary context switches: 3
Swaps: 0
File system inputs: 56
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
Он учитывает MAX RSS, а не VSS, поэтому будет ли он полезным для вас или нет, в значительной степени зависит от вашей задачи.
UPD. : Mac OS X "думать" немного отличается , но все же это time
:
/usr/bin/time -l /Applications/Opera.app/Contents/MacOS/Opera
244.63 real 54.34 user 26.44 sys
284827648 maximum resident set size
0 average shared memory size
0 average unshared data size
0 average unshared stack size
711407 page reclaims
1272 page faults
0 swaps
155 block input operations
251 block output operations
98542 messages sent
68330 messages received
16 signals received
699 voluntary context switches
468999 involuntary context switches
time(1)
?