DOKK / manpages / debian 12 / bpfcc-tools / ppchcalls-bpfcc.8.en
ppchcalls(8) System Manager's Manual ppchcalls(8)

ppchcalls - Summarize ppc hcall counts and latencies.

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

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.

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.

Print usage message.
Trace only this process.
Trace only this thread.
Print the summary at the specified interval (in seconds).
Total duration of trace (in seconds).
Print only this many entries. Default: 10.
Trace only failed hcalls (i.e., the return value from the hcall was < 0).
Trace only hcalls that failed with that error (e.g. -e EPERM or -e 1).
Display times in milliseconds. Default: microseconds.
Summarize by process and not by hcall.
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.
Trace this hcall only (use option -l to get all recognized hcalls).

# ppchcalls
# ppchcalls -P
# ppchcalls -x
# ppchcalls -e EPERM
# ppchcalls -p 181
# ppchcalls -L

Process ID
Process name
Hcall name, or "[unknown: nnn]" for hcalls that aren't recognized
The number of events
The minimum elapsed time (in us or ms)
The maximum elapsed time (in us or ms)
The average elapsed time (in us or ms)

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.

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.

Linux

Unstable - in development.

Harsh Prateek Bora

syscount(8)

2022-10-19 USER COMMANDS