Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am about to start my masters project and I will need to gather some data, for the requirements stage, about the performance footprint applications have on my system. The main things I am look for are load times, memory and CPU usage and shutdown time, although I would like to get as much information as possible. I know I can use the system monitor to get some of this stuff, but I need precise data as I am going to be doing some before and after tests during my project. Is there anything out there (preferably open source) that will suffice?

share|improve this question
up vote 7 down vote accepted

You could simply do time command, it will give you something like this:

$ time sleep 3
real    0m3.001s
user    0m0.000s
sys 0m0.000s

If you need more output, use /usr/bin/time -v:

$ /usr/bin/time -v sleep 3
Command being timed: "sleep 3"
User time (seconds): 0.00
System time (seconds): 0.00
Percent of CPU this job got: 0%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.01
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): 2192
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 1
Minor (reclaiming a frame) page faults: 181
Voluntary context switches: 3
Involuntary context switches: 1
Swaps: 0
File system inputs: 16
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
share|improve this answer

You should use The GNU Accounting Utilities. This will give you detailed process resource information.

You can install them by doing: sudo aptitude install acct

Print the recorded statistics to the terminal by running: sa

The ubuntu man page for sa is here.

sa summarizes information about previously executed commands as recorded in the acct file. In addition, it condenses this data into a summary file named savacct which contains the number of times the command was called and the system resources used. The information can also be summarized on a per-user basis; sa will save this information into a file named usracct.

share|improve this answer

What about using the top or ps command? :

top > footprint.txt &

ps > footprint.txt &

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.