Section 8 · System administration

bcc-ppchcalls.8

Package: bcc-tools

On this page

ppchcalls

NAME
SYNOPSIS
DESCRIPTION
REQUIREMENTS
OPTIONS
EXAMPLES
FIELDS
OVERHEAD
SOURCE
OS
STABILITY
AUTHOR
SEE ALSO


NAME

ppchcalls − Summarize ppc hcall counts and latencies.

SYNOPSIS

ppchcalls [-h] [-p PID] [-t TID] [-i INTERVAL] [-d DURATION] [-T TOP] [-x] [-e ERRNO] [-L] [-m] [-P] [-l] [—hcall HCALL]

DESCRIPTION

This tool traces hcall entry and exit raw tracepoints and summarizes either the number of hcalls of each type, or the number of hcalls per process. It can also collect min, max and average latency for each hcall or each process.

Since this uses BPF, only the root user can use this tool.

REQUIREMENTS

CONFIG_BPF and bcc. Linux 4.17+ is required to attach a BPF program to the raw_hcalls:hcall_{enter,exit} tracepoints, used by this tool.

OPTIONS

−hPrint usage message.
−p PIDTrace only this process.
−t TIDTrace only this thread.

−i INTERVAL

Print the summary at the specified interval (in seconds).

−d DURATION

Total duration of trace (in seconds).

−T TOPPrint only this many entries. Default: 10.
−xTrace only failed hcalls (i.e., the return value from the hcall was < 0).

−e ERRNO

Trace only hcalls that failed with that error (e.g. -e EPERM or -e 1).

−mDisplay times in milliseconds. Default: microseconds.
−PSummarize by process and not by hcall.
−lList the hcalls recognized by the tool (hard-coded list). Hcalls beyond this list will still be displayed, as “[unknown: nnn]” where nnn is the hcall number.

−-hcall HCALL

Trace this hcall only (use option -l to get all recognized hcalls).

EXAMPLES

Summarize all hcalls by hcall:

ppchcalls

Summarize all hcalls by process:

ppchcalls −P

Summarize only failed hcalls:

ppchcalls −x

Summarize only hcalls that failed with EPERM:

ppchcalls −e EPERM

Trace PID 181 only:

ppchcalls −p 181

Summarize hcalls counts and latencies:

ppchcalls −L

FIELDS

PIDProcess ID
COMMProcess name
HCALLHcall name, or “[unknown: nnn]” for hcalls that aren’t recognized
COUNTThe number of events
MINThe minimum elapsed time (in us or ms)
MAXThe maximum elapsed time (in us or ms)
AVGThe average elapsed time (in us or ms)

OVERHEAD

For most applications, the overhead should be manageable if they perform 1000’s or even 10,000’s of hcalls per second. For higher rates, the overhead may become considerable.

SOURCE

This is from bcc.

https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool.

OS

Linux

STABILITY

Unstable - in development.

AUTHOR

Harsh Prateek Bora

SEE ALSO

syscount(8)