As with the HP Caliper command-line options, each of the Advisor’s command-line options has a variable counterpart in the .caliperinit file that can set an option value. The variable name is the same as the option, with hyphens (-) replaced with underscores (_). Later uses of the same command-line option or .caliperinit file variable overrides earlier uses.

Getting Started with the Advisor: Examples

To run the Advisor, you need to make one or more HP Caliper measurement runs on an application.

Simplest Example

Assume that you have made these data collection runs:

$ caliper cpu my_app $ caliper fprof my_app $ caliper ecount my_app

The output databases are saved in the databases directory by default and are named cpu, fprof, and ecount.

Then, you run the Advisor using this command:

$ caliper advise

HP Caliper looks in the databases directory for databases and produces an analysis of all current HP Caliper runs, using all the databases in the databases directory. If no databases are found, you receive an error message telling you that there are no runs to analyze.

The analysis report is produced on stdout.

NOTE: You will receive an error message specifying that the “global name 'dbase_dir' is not defined” if the default databases directory contains old performance data. To correct this problem, you should delete the old performance data in the databases directory or specify a different database path. For information on how to specify a database path, see “Command Line to Invoke the Advisor” (page 79).

More Typical Examples

These examples are more typical of how you will use the Advisor.

When you first start using the Advisor, you will typically run these measurements:

On HP-UX systems, use:

$ caliper cpu my_app $ caliper fprof my_app

On Linux systems, use:

$ caliper ecount my_app $ caliper fprof my_app

Next, run the Advisor on the collected performance data:

$ caliper advise

HP Caliper looks for the databases in the databases directory and produces an analysis report on stdout. If the Advisor recommends an additional measurement run, make the run. For example:

$ caliper dcache my_app

Then, re-run the Advisor to analyze the full set of performance data and produce a more comprehensive analysis report:

$ caliper advise

If any suggested changes are made to the application, then you can measure and analyze the revised program:

$ caliper cpu my_new_app

Getting Started with the Advisor: Examples

81

Page 81
Image 81
HP UX IPFilter Software manual Getting Started with the Advisor Examples, Simplest Example, More Typical Examples