dafang / notebook

My self learning notebook
98 stars 29 forks source link

Linux performance - perf/systemtap/sar #151

Open dafang opened 9 years ago

dafang commented 9 years ago

Install systemtap on Ubuntu

As you may not be able to find the correct kernel debug info from the ddebs source, it is better you can compile it from source:

sudo apt-get install systemtap
sudo apt-get install systemtap-sdt-dev

cd $HOME
sudo apt-get install dpkg-dev debhelper gawk
mkdir tmp && cd tmp
sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)
apt-get source linux-image-$(uname -r)
cd linux-3.13.0
fakeroot debian/rules clean
AUTOBUILD=4 fakeroot debian/rules binary-generic skipdbg=false

then use dpkg -i to install the compiled .ddeb file.

Also recommend to install module debug info:

sudo apt-get install elfutils

Then reboot your server...

dafang commented 9 years ago

Install systemtap on CentOS is easier to follow this

dafang commented 9 years ago
dafang commented 9 years ago

systemtap for nginx examples

dafang commented 8 years ago

Install dtrace on Ubuntu

dafang commented 8 years ago

codename=$(lsb_release -c | awk '{print $2}') sudo tee /etc/apt/sources.list.d/ddebs.list << EOF deb http://ddebs.ubuntu.com/ ${codename} main restricted universe multiverse deb http://ddebs.ubuntu.com/ ${codename}-security main restricted universe multiverse deb http://ddebs.ubuntu.com/ ${codename}-updates main restricted universe multiverse deb http://ddebs.ubuntu.com/ ${codename}-proposed main restricted universe multiverse EOF

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ECDCAD72428D7C01 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C8CAB6595FDFF622

sudo apt-get update sudo apt-get install linux-image-$(uname -r)-dbgsym

apt-get install linux-image-3.13.0-86-generic apt-get install linux-image-3.13.0-86-generic-dbgsym