Skip to main content

Command reference

usage: ntprof <command> [options] [files]
CommandWhat it does
recordprofile the running kernel or SPDK (needs root)
report FILE...report recordings: the host's, and the target's
compare BASE LOADeach stage's latency amplification (LAD) between two runs; a run is host.ntp or host.ntp,target.ntp
probecheck which hooks this kernel offers, and load them without attaching
dump FILE...print the records of recordings as CSV
versionprint the version

Record options​

OptionMeaning
-r, --role ROLEhost (default), target, or both
-t, --transport Ttcp (default) or rdma
-d, --duration SECstop after SEC seconds (default: Ctrl-C)
-i, --interval SECone line per group every SEC seconds (default 1)
--offlineno interval lines, only the final report
-s, --sample Nrecord one command in N (default 1000); the host and the target must use the same N
-o, --output FILEsave the records to FILE
--session DEVthe namespace to profile, nvmeXnY (default: all)
--io-type Tread, write, or both (default)
--size LISTonly these I/O sizes, for example 4K,128K
--spdk-host PATHthe host is SPDK: the binary with ntprof's probes (with a shared build, its libraries, comma-separated)
--spdk-target PATHthe target is SPDK, for example build/bin/nvmf_tgt
--exact-queuescount queue lengths per command (costs map operations on every I/O; default: the mean number in each stage, by Little's law)
--btf DIRBTF from tools/gen-btf.sh, for kernels or modules without BTF
--kprobesuse kprobes even where fentry/fexit work
--fentryuse fentry/fexit even when a busy CPU would make attaching them wait

Report options​

For record, report and compare:

OptionMeaning
--detailevery component, not only the stages
--all-groupsalso groups with under 1 % of the records
--aggregation Aavg (mean, p50, p99, p99.9), min, max, or dist (all quantiles)
-j, --json FILEwrite the final report as JSON

Other options​

OptionMeaning
-c, --config FILEa task file in ini format (examples/ntprof.ini in the repository lists every key); options on the command line override it
-v, --verbosemore messages (twice: libbpf's debug output)
-h, --helpthe usage text; -V, --version: the version

NTPROF_SKIP=prog,prog leaves the named programs out, to measure what each hook costs.