You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.1 KiB
78 lines
2.1 KiB
.TH dcsnoop 8 "2016-02-10" "USER COMMANDS"
|
|
.SH NAME
|
|
dcsnoop \- Trace directory entry cache (dcache) lookups. Uses Linux eBPF/bcc.
|
|
.SH SYNOPSIS
|
|
.B dcsnoop [\-h] [\-a]
|
|
.SH DESCRIPTION
|
|
By default, this traces every failed dcache lookup (cache miss), and shows the
|
|
process performing the lookup and the filename requested. A \-a option can be
|
|
used to show all lookups, not just failed ones.
|
|
|
|
The output of this tool can be verbose, and is intended for further
|
|
investigations of dcache performance beyond dcstat(8), which prints
|
|
per-second summaries.
|
|
|
|
This uses kernel dynamic tracing of the d_lookup() function, and will need
|
|
and will need updating to match any changes to this function.
|
|
|
|
Since this uses BPF, only the root user can use this tool.
|
|
.SH REQUIREMENTS
|
|
CONFIG_BPF and bcc.
|
|
.SH OPTIONS
|
|
.TP
|
|
\-h
|
|
Print usage message.
|
|
.TP
|
|
\-a
|
|
Trace references, not just failed lookups.
|
|
.SH EXAMPLES
|
|
.TP
|
|
Trace failed dcache lookups:
|
|
#
|
|
.B dcsnoop
|
|
.TP
|
|
Trace all dcache lookups:
|
|
#
|
|
.B dcsnoop \-a
|
|
.SH FIELDS
|
|
.TP
|
|
TIME(s)
|
|
Time of lookup, in seconds.
|
|
.TP
|
|
PID
|
|
Process ID.
|
|
.TP
|
|
COMM
|
|
Process name.
|
|
.TP
|
|
T
|
|
Type: R == reference (only visible with \-a), M == miss. A miss will print two
|
|
lines, one for the reference, and one for the miss.
|
|
.TP
|
|
FILE
|
|
The file name component that was being looked up. This contains trailing
|
|
pathname components (after '/'), which will be the subject of subsequent
|
|
lookups.
|
|
.SH OVERHEAD
|
|
File name lookups can be frequent (depending on the workload), and this tool
|
|
prints a line for each failed lookup, and with \-a, each reference as well. The
|
|
output may be verbose, and the incurred overhead, while optimized to some
|
|
extent, may still be from noticeable to significant. This is only really
|
|
intended for deeper investigations beyond dcstat(8), when absolutely necessary.
|
|
Measure and quantify the overhead in a test environment before use.
|
|
.SH SOURCE
|
|
This is from bcc.
|
|
.IP
|
|
https://github.com/iovisor/bcc
|
|
.PP
|
|
Also look in the bcc distribution for a companion _examples.txt file containing
|
|
example usage, output, and commentary for this tool.
|
|
.SH OS
|
|
Linux
|
|
.SH STABILITY
|
|
Unstable - in development.
|
|
.SH AUTHOR
|
|
Brendan Gregg
|
|
.SH SEE ALSO
|
|
dcstat(1)
|