STANNIX Community


Manual: opensnoop.bt

opensnoop.bt(8)					   System Manager's Manual				     opensnoop.bt(8)

NAME
       opensnoop.bt - Trace open(),openat(),openat2() syscalls. Uses bpftrace/eBPF.

SYNOPSIS
       opensnoop.bt -- [--depth=]

DESCRIPTION
       opensnoop  traces  the open(),openat(),openat2() syscall, showing which processes are attempting to open which files.
       This can be useful for determining the location of config and log files, or for troubleshooting applications that are
       failing, specially on startup.

       This works by tracing the open(),openat(),openat2() syscall tracepoint.

       Since this uses BPF, only the root user can use this tool.

OPTIONS
       --depth= Used to set the maximum supported path depth, default is 35.

REQUIREMENTS
       CONFIG_BPF and bcc.

EXAMPLES
       Trace all open(),openat(),openat2() syscalls:
	      # opensnoop.bt

FIELDS
       PID Process ID

       COMM   Process name

       FD     File descriptor (if success), or -1 (if failed)

       ERR    Error number (see the system's errno.h)

       PATH   Open path

OVERHEAD
       This traces the open tracepoint and prints output for each event. As the rate of this is generally expected to be low
       (< 1000/s), the overhead is also expected to be negligible. If you have an application that is calling a high rate of
       open()s, then test and understand overhead before use.

SOURCE
       This is from bpftrace.

	      https://github.com/bpftrace/bpftrace

       Also look in the bpftrace distribution for a companion _examples.txt file containing example usage, output, and	com‐
       mentary for this tool.

       This  is	 a  bpftrace  version of the bcc tool of the same name. The bcc tool may provide more options and customiza‐
       tions.

	      https://github.com/iovisor/bcc

OS
       Linux

STABILITY
       Unstable - in development.

AUTHORS
       Brendan Gregg, Rong Tao 

SEE ALSO
       statsnoop.bt(8), execsnoop.bt(8)

USER COMMANDS						 2018-09-08					     opensnoop.bt(8)