4

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?

3 Answers 3

7
+100

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
0

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.

0

What about using the top or ps command? :

top > footprint.txt &

ps > footprint.txt &

You must log in to answer this question.