Table 5 Name Source Options Used with -p some (continued)

OptionDescription

arg1 or argv1 The name is argument 1 of the process or "" (empty string) if there is not such an argument.

The last option specified takes precedence.

Table 6 Process Origin Options Used with -p some

Option

Description

 

 

root

Denotes the initial root process.

 

 

fork

Matches any process created by fork of a measured or tracked parent process.

 

 

exec

Matches any process created by exec of a measured or tracked process.

 

 

The default is to match any process origin.

If you specify multiple options, HP Caliper looks for matches for any of the options. For example, (exec,fork)matches any process that was started with exec or fork from a measured or tracked process.

Examples of the -p Option

To measure only ecom and ld

$ caliper ecount -p ecom:ld cc hw.c

To measure only processes starting with the letter “c”: $ caliper ecount -p "c*" cc hw.c

Reports information for: cc (root), cc (fork), cc (fork), ctcom.

To measure only processes where the last letter is “m”: $ caliper ecount -p "(regexp)m$" cc hw.c

Reports only information for: ctcom.

To measure every process except those created by fork:

$ caliper ecount -p "*" -p "(fork,track)*" cc hw.c

Reports information for: cc (root), ecom, ld.

This command causes HP Caliper to track the process created with fork and if the process calls exec, the new process is measured, not simply tracked. This is useful when you do not want to measure the period between fork and exec calls.

To select based on argv1:

$ cat /path/ls.sh #!/bin/sh

ls

$ caliper ecount -p "(arg1)*ls.sh" /path/ls.sh

Reports information for: /bin/sh /path/ls.sh, but does not report ls.

To select based on argv0:

$ caliper ecount -p "(arg0)ora*" ./sqlplus

Reports information on processes having ora as a prefix of their argument 0.

To detach from unimportant processes:

$ caliper ecount -p "*" -p (ignore)basename ...

HP Caliper does not track or measure children of the detached process.

Configuring Data Collection 99