I can pretty quickly monitor the running time of a process with
x@y ~ $ time foo real 0m14.299s user 0m4.770s sys 0m0.440s
Is there a way I can get the same data for I/O and CPU usage of an argument, recorded to STDOUT? A simple command or utility like
time would be ideal, where I just pass the argument of the thing I want to run:
x@y ~ $ stats foo wallclock runtime 0m14.299s I/O reads 290,420 KB I/O writes 239,429 KB peak CPU usage 18.62% mean CPU usage 1.44% # etc.