0

I am using Ubuntu 12.0.4 64 bit server edition and I have to measure the server performance for some specific programs.

Is there a way to record the total System resource usage by a specific command?

For example, I have some 10 commands in a perl script file. Can I measure the total (during total time consumed by the command) CPU run time, %CPU usage, Memory Usage, etc., for each of the 10 commands?

1 Answer 1

0

The time command (/usr/bin/time, not the shell builtin) can report these and a host of other statistics:

$ /usr/bin/time -f "Real time: %E\nCPU Usage: %P\nAverage Memory Usage: %t" some-command
Real time: 0:01.05
CPU Usage: 99%
Average Memory Usage: 0

See the manpage for more.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .