HP HP-UX Developer Tools Quick Start Guide

creates a report from differenced DBs
measurement runs, and graphically explore performance
with the last data
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 report|merge|diff [opts] [DB …] $ caliper advise [opts] [DB …] $ caliper info [opts]
where: measurement specifies what type of data to collect opts are HP Caliper options in these forms:
-o [value] or –-option [value] app is a program to invoke and measure app_args are the arguments to app PID is ID of a p ro cess to atta ch to and m easure
-w collects data system-wide (all processes) DB is a database to re por t or an alyz e report creates a report from DB(s) merge creates a report from merged DBs diff advise generates performance tuning advice info generates help information
Measurements (measurement argument)
alat ALAT miss profile branch branch prediction profile cpu CPU event metrics (HP-UX) cstack sampled call stack profile cycles flat profile of IPs
(dual-core Itanium 2 only) {d|i}cache data or instruction cache misses {d|i}tlb data or instruction TLB misses
ecount counts of specific CPU events fprof flat profile of function CPU time overview enables collecting fprof, cstack
and dcache data in one single collection run
scgprof sampled call graph profile traps traps, 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
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.txt write text report to out.txt –-csv out.csv write 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 all root process and all descendants
(the default)
-p root root (initial) process only
-p root-fork root process and forked children
-p name processes whose executable’s
base name is name
-p (argv0)name processes whose argv[0] is name
-p (argv1)name processes whose argv[1] is name
-p (exec)name processes created by exec() whose executable file is name
-p (vfork-exec)name processes created by vfork() and exec() whose executable file
is name
-p (regexp)expr processes whose executable name matches regular expression, expr
-p (fork,argv1,regexpr)expr
processes 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 Par ameter s
(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 1000
-s ,5% use default number of events, varying the event count by 5%
-s ,,CPU_CYCLES use default event count and variation; use CPU_CYCLES as the sampling event
-s 5000,,CC sample every 5000 CPU_CYCLES (abbr. CC) using default variation
Grouping Data
–-group-by executable show across-process data for executables (default)
–-group-by module show across-process data for load modules
–-group-by none show data for each process
Reporting from a Database
$ caliper measurement [opts] –d dbName app
save data to database dbName
$ caliper report [opts] dbName
report from database dbName
Merging or Differencing Data from Multiple Runs
$ caliper merge –-csv dir dbName latest
merge data collected in database dbName recorded in .hp_caliper_databases; write CSV output to directory dir
$ caliper diff –o out.txt db1 db2
difference 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 –r measurement
print help for measurement $ caliper info name
list event name and/or all events whose name contains
name
-h or -? print short help text
-H or --help print long help text
--info append help to report
Loading...