Skip to content

Instantly share code, notes, and snippets.

@notsobad
Last active January 16, 2020 10:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notsobad/b8f5ebb9b99f3a818f30 to your computer and use it in GitHub Desktop.
Save notsobad/b8f5ebb9b99f3a818f30 to your computer and use it in GitHub Desktop.
Install nginx-systemtap-toolkit and nginx-systemtap-toolkit

install openresty

sudo apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make
wget http://openresty.org/download/ngx_openresty-1.7.2.1.tar.gz
tar xzvf ngx_openresty-1.7.2.1.tar.gz
cd ngx_openresty-1.7.2.1/
./configure
make
make install

update kernel

sudo apt-get install linux-image-generic-lts-saucy

install systemtap

sudo apt-get install build-essential m4
wget https://fedorahosted.org/releases/e/l/elfutils/0.159/elfutils-0.159.tar.bz2
tar -xvf elfutils-0.159.tar.bz2
wget https://sourceware.org/systemtap/ftp/releases/systemtap-2.5.tar.gz
tar -xvf systemtap-2.5.tar.gz
cd systemtap-2.5/
./configure --prefix=/opt/stap --disable-docs \
            --disable-publican --disable-refdocs CFLAGS="-g -O2" \
            --with-elfutils=../elfutils-0.159
make -j8
sudo make install

install nginx-systemtap-toolkit

sudo apt-get install linux-headers-`uname -r`

git clone https://github.com/openresty/nginx-systemtap-toolkit.git
cd ngx_openresty-1.7.2.1/

./ngx-active-reqs -p 32027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment