Cloudxtreme / nginx-dtrace

An nginx fork that adds dtrace USDT probes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is an Nginx fork that adds dtrace USDT probes.

Installation:

    ./configure --with-dtrace-probes \
        --with-dtrace=/usr/sbin/dtrace \
        ...
    make
    make install

Usage on Linux (with systemtap):

    # make the stap-nginx script visiable in your PATH
    export PATH=/usr/local/nginx/sbin:$PATH

    # list all the static probes available in your nginx
    stap-nginx -L 'process("nginx").mark("*")'

    # run the test.stp file
    stap-nginx test.stp

Sample test.stp file:

    probe begin
    {
        print("Tracing.  Hit CTRL-C to stop.\n")
    }

    probe process("nginx").mark("http-subrequest-start")
    {
        printf("uri: %s?%s\n", ngx_http_req_uri($arg1),
            ngx_http_req_args($arg1))
    }

For now, only tested on Solaris 11 Express and Fedora Linux 17.

The original Nginx documentation is available at http://nginx.org

About

An nginx fork that adds dtrace USDT probes

License:BSD 2-Clause "Simplified" License


Languages

Language:C 89.9%Language:Ruby 8.7%Language:C++ 0.5%Language:XS 0.5%Language:Perl 0.2%Language:Nginx 0.1%Language:DTrace 0.0%Language:Objective-C 0.0%Language:HTML 0.0%Language:Assembly 0.0%Language:Shell 0.0%