Command reference
usage: ntprof <command> [options] [files]
| Command | What it does |
|---|---|
record | profile the running kernel or SPDK (needs root) |
report FILE... | report recordings: the host's, and the target's |
compare BASE LOAD | each stage's latency amplification (LAD) between two runs; a run is host.ntp or host.ntp,target.ntp |
probe | check which hooks this kernel offers, and load them without attaching |
dump FILE... | print the records of recordings as CSV |
version | print the version |
Record options
| Option | Meaning |
|---|---|
-r, --role ROLE | host (default), target, or both |
-t, --transport T | tcp (default) or rdma |
-d, --duration SEC | stop after SEC seconds (default: Ctrl-C) |
-i, --interval SEC | one line per group every SEC seconds (default 1) |
--offline | no interval lines, only the final report |
-s, --sample N | record one command in N (default 1000); the host and the target must use the same N |
-o, --output FILE | save the records to FILE |
--session DEV | the namespace to profile, nvmeXnY (default: all) |
--io-type T | read, write, or both (default) |
--size LIST | only these I/O sizes, for example 4K,128K |
--spdk-host PATH | the host is SPDK: the binary with ntprof's probes (with a shared build, its libraries, comma-separated) |
--spdk-target PATH | the target is SPDK, for example build/bin/nvmf_tgt |
--exact-queues | count queue lengths per command (costs map operations on every I/O; default: the mean number in each stage, by Little's law) |
--btf DIR | BTF from tools/gen-btf.sh, for kernels or modules without BTF |
--kprobes | use kprobes even where fentry/fexit work |
--fentry | use fentry/fexit even when a busy CPU would make attaching them wait |
Report options
For record, report and compare:
| Option | Meaning |
|---|---|
--detail | every component, not only the stages |
--all-groups | also groups with under 1 % of the records |
--aggregation A | avg (mean, p50, p99, p99.9), min, max, or dist (all quantiles) |
-j, --json FILE | write the final report as JSON |
Other options
| Option | Meaning |
|---|---|
-c, --config FILE | a task file in ini format (examples/ntprof.ini in the repository lists every key); options on the command line override it |
-v, --verbose | more messages (twice: libbpf's debug output) |
-h, --help | the usage text; -V, --version: the version |
NTPROF_SKIP=prog,prog leaves the named programs out, to measure what each hook costs.