HP Caliper 5.3 Quick Start

Updated: September 2012
http://www.hp.com/go/caliper
HP Caliper commands have the following forms:

$ caliper measurement [opts] app [app_args] $ caliper measurement [opts] PID [PID2 …] $ caliper measurement [opts] -w

$ caliper reportmergediff [opts] [DB …] $ caliper advise [opts] [DB …]$ caliper info [opts]
where:specifies what type of data to collect
measurement

opts

are HP Caliper options in these forms:

 

-o [value] or –-option [value]
appis a program to invoke and measure
app_argsare the arguments to app
PID

is ID of a process to attach to and measure

-w

collects data system-wide (all processes)

DB

is a database to report or analyze
reportcreates a report from DB(s)
mergecreates a report from merged DBs
diffcreates a report from differenced DBs
advisegenerates performance tuning advice
infogenerates help information
Measurements (measurement argument)
alatALAT miss profile
branchbranch prediction profile
cpuCPU event metrics (HP-UX)
cstacksampled call stack profile
cyclesflat profile of IPs
{di}cache(dual-core Itanium 2 only)

data or instruction cache misses

{di}tlbdata or instruction TLB misses
ecountcounts of specific CPU events
fprofflat profile of function CPU time
overviewenables collecting fprof, cstack

 

and dcache data in one single
scgprofcollection run
sampled call graph profile
trapstraps, interrupts, and faults

 

(dual-core Itanium 2 only)

Using the Graphical User Interface
$ caliper –g [--jre path]

start GUI to interactively set collection specification, initiate measurement runs, and graphically explore performance

Choosing Target of Data Collection
--scope process

specific processes (default)

--sc p(short form of above)

-w

all processes on system
Generating Reports
–o out.txtwrite text report to out.txt
–-csv out.csvwrite CSV report to out.csv
Collecting System Usage Data
(for any measurement; not available on Linux)--system-usage= [all][:runstatus][:io][:syscalls]
Choosing Specific Processes to Measure
(--scope process, the default, assumed)
-p allroot process and all descendants
-p root(the default)
root (initial) process only
-p root-forkroot process and forked children
-pnameprocesses whose executable’s
-p (argv0)namebase name is name
processes whose argv[0] is
-p (argv1)name

name

processes whose argv[1] is
-p (exec)name

name

processes created by exec()

 

whose executable file is name
-p (vfork-exec)name

 

processes created by vfork()

 

and exec() whose executable file

-p (regexp)expris name

processes whose executable name

matches regular expression, expr-p (fork,argv1,regexpr)exprprocesses created by fork()whose argv[1] matches expr -p (glob)name1:name2

processes whose executable name matches name1 or name2, both of which may contain shell wildcards

-p (regexp)foo.* -p (ignore)foobar

processes whose executable name starts with ‘foo’, but do not collect data on foobar or its descendants

-p (regexp)foo.* -p (track)foobar

processes whose executable name starts with ‘foo’; potentially profile descendants of, but do not collect data on, foobar

Changing Sampling Parameters
(for measurements that use sampling)

-s 50000

sample every 50,000 events

-s 50000,1000

sample every 50,000 events,

 

varying the event count by

-s ,5%

1000

use default number of events,
-s ,,CPU_CYCLESvarying the event count by 5%
use default event count and

 

variation; use CPU_CYCLES
-s 5000,,CCas the sampling event
sample every 5000

 

CPU_CYCLES (abbr. CC) using

 

default variation
Grouping Data
–-group-by executableshow across-process data for executables (default) –-group-by moduleshow across-process data for load modules –-group-by noneshow data for each process
Reporting from a Database
$ caliper measurement [opts] –ddbName appsave data to database dbName$ caliper report [opts] dbNamereport from database dbName
Merging or Differencing Data from Multiple Runs
$ caliper merge –-csv dir dbName latest

merge data collected in database dbName with the last data recorded in .hp_caliper_databases; write CSV output to directory dir

$ caliper diff –o out.txt db1 db2difference the data from db1 and db2 and write the output report to out.txt
Getting Help
$ man caliper man page with full descriptions $ caliper info –rmeasurementprint help for measurement $ caliper info name

 

list event name and/or all

 

events whose name contains

-h or -?

name

print short help text
-H or --helpprint long help text
--infoappend help to report