# stapbpf

## NAME



           stapbpf - systemtap bpf runtime
    


## SYNOPSIS



           **stapbpf**[ _OPTIONS_ ] _MODULE_
    


## DESCRIPTION



           The _stapbpf_ program is the BPF back-end of the Systemtap tool.  It
           expects a bpf-elf file produced by the front-end _stap_ tool, when
           run with _--runtime=bpf_.
    
           Splitting the systemtap tool into a front-end and a back-end
           allows a user to compile a systemtap script on a development
           machine that has the debugging information needed to compile the
           script and then transfer the resulting shared object to a
           production machine that doesn't have any development tools or
           debugging information installed.
    
           Please refer to stappaths(7) for the version number, or run
    
            $ rpm -q systemtap # (for Fedora/RHEL)
            $ apt-get -v systemtap # (for Ubuntu)
    


## OPTIONS



           The _stapbpf_ program supports the following options.  Any other
           option prints a list of supported options.
    
           **-v** Verbose mode.
    
           **-V** Print version number and exit.
    
           **-w** Suppress warnings from the script.
    
           **-h** Print help message.
    
           **-x PID** The '_stp_target' variable will be set to PID.
    
           **-o FILE**
                  Send output to FILE.
    


## ARGUMENTS



           **MODULE** is the path of a bpf-elf file produced by the front-end
           _stap_ tool, when run with _--runtime=bpf_.
    


## EXAMPLES



           Here is a very basic example of how to generate a _stapbpf_ module.
           First, use _stap_ to compile a script.  The _stap_ program will report
           the name of the resulting module in the current working directory.
    
            $ stap --runtime=bpf -p4 -e 'probe begin { printf("Hello
           World!\n"); exit() }'
            stap_28784.bo
    
           Run _stapbpf_ with the pathname to the module as an argument.
    
            $ stapbpf ./stap_28784.bo
            Hello World!
    
           If the _-p4_ option is omitted, _stap_ will invoke _stapbpf_
           automatically.
    


## LIMITATIONS



           This runtime is in an early stage of development and it currently
           lacks support for a number of features available in the default
           runtime.  A subset of the following probe points is supported:
    
                  begin
                  end
                  kernel.*
                  process.*
                  timer.*
                  perf.*
                  procfs.*
    
           In general, probes based on the kprobes, uprobes, tracepoint and
           perf infrastructures are supported. See stapprobes(3stap) for more
           information on the probe points and which tracing infrastructures
           they are based on.
    
           **for** loops, **foreach** loops and **while** loops are usable only in **begin**
           and **end** probes.  **try** statements are not supported.
    
           There is limited support for string operations. String variables
           and literals are limited to 64 characters, except for **printf** for‐
           mat strings, which are limited to 256 characters.
    
           A subset of the statistical aggregate functionality is available,
           with support only for the _@count()_ , _@sum()_ , _@avg()_ extractor func‐
           tions.
    
           The name of the bpf-elf file produced by the front-end _stap_ tool
           should not be changed.
    


## SAFETY AND SECURITY



           See the stap(1) manual page for additional information on safety
           and security.
    


## BUGS



           Use the Bugzilla link of the project web page or our mailing list.
           **http://sourceware.org/systemtap/ **, **< systemtap@sourceware.org>**.
    


* * *