ppchcalls(8) System Manager's Manual ppchcalls(8)

# [NAME](#NAME)

ppchcalls - Summarize ppc hcall counts and latencies.

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#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](#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](#OPTIONS)

[-h](#h)

Print usage message.

[-p PID](#p)

Trace only this process.

[-t TID](#t)

Trace only this thread.

[-i INTERVAL](#i)

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

[-d DURATION](#d)

Total duration of trace (in seconds).

[-T TOP](#T)

Print only this many entries. Default: 10.

[-x](#x)

Trace only failed hcalls (i.e., the return value from the hcall was &lt; 0).

[-e ERRNO](#e)

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

[-m](#m)

Display times in milliseconds. Default: microseconds.

[-P](#P)

Summarize by process and not by hcall.

[-l](#l)

List 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](#hcall)

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

# [EXAMPLES](#EXAMPLES)

[Summarize all hcalls by hcall:](#Summarize)

\# **ppchcalls**

[Summarize all hcalls by process:](#Summarize~2)

\# **ppchcalls -P**

[Summarize only failed hcalls:](#Summarize~3)

\# **ppchcalls -x**

[Summarize only hcalls that failed with EPERM:](#Summarize~4)

\# **ppchcalls -e EPERM**

[Trace PID 181 only:](#Trace)

\# **ppchcalls -p 181**

[Summarize hcalls counts and latencies:](#Summarize~5)

\# **ppchcalls -L**

# [FIELDS](#FIELDS)

[PID](#PID)

Process ID

[COMM](#COMM)

Process name

[HCALL](#HCALL)

Hcall name, or "\[unknown: nnn]" for hcalls that aren't recognized

[COUNT](#COUNT)

The number of events

[MIN](#MIN)

The minimum elapsed time (in us or ms)

[MAX](#MAX)

The maximum elapsed time (in us or ms)

[AVG](#AVG)

The average elapsed time (in us or ms)

# [OVERHEAD](#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](#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](#OS)

Linux

# [STABILITY](#STABILITY)

Unstable - in development.

# [AUTHOR](#AUTHOR)

Harsh Prateek Bora

# [SEE ALSO](#SEE_ALSO)

[syscount(8)](/man/enterprise-packages/bcc/syscount.8)

2022-10-19 USER COMMANDS

---

Document: ppchcalls(8) from bcc 0.37.0-r3 (Chainguard OS)
Source: https://github.com/iovisor/bcc
