Chapter 5. Collecting Data on Machine Resource Usage

This chapter describes how to collect machine resource usage data using the SpeedShop ssusage command. Finding out the machine resources that your program uses can help you identify performance bottlenecks and determine which performance experiments you need to run. You can use Table 1-4 to identify which experiments to run, based on the results of running ssusage on your program.

ssusage Syntax

ssusage prog_name [prog_args]

prog_name 

Name of the executable for which you want to collect machine resource usage data.

prog_args 

Arguments to your executable, if any.

ssusage Results

ssusage prints output to stderr. For example, the command

ssusage generic

provides output similar to the following:

...
22.03 real, 18.18 user, 0.21 sys, 7 majf, 120 minf, 0 sw, 241 rb, 0 wb, 135 vcx, 648 icx

The last two lines of the output is the machine resource usage information that ssusage provides. Each field in the report is described below.

real 

Elapsed time during the command, in seconds.

user 

User CPU time in seconds.

sys 

System CPU time in seconds.

majf 

Major page faults that cause physical I/O.

minf 

Minor page faults that require mapping only.

sw  

Process swaps.

rb/wb 

Physical blocks read/written. Note that these are attributed to the process that first requests a block, but do not necessarily directly correlate with the process' own I/O operations.

vcx  

Voluntary context switches, that is, those caused by the process' own actions.

icx  

Involuntary context switches, that is, those caused by the scheduler.

If the program terminates abnormally, a message is printed before the usage line.